[Gambas-user] HttpClient not exposing redirect response codes
Benoît Minisini
gambas at ...1...
Thu Apr 27 09:01:20 CEST 2017
Le 25/04/2017 à 19:12, T Lee Davidson a écrit :
> I have run into a couple of sites that are responding with 301 (Moved
> Permanently) and 302 (Moved Temporarily) codes. However, HttpClient.Code
> yields "0" for both of those sites/codes (and HttpClient.Reason is
> empty). 200 & 404 codes are reported successfully.
>
> Have I missed something in the properties that is preventing proper
> disclosure of redirect response codes?
>
> Or is this a bug?
>
> (Project attached.)
>
I have just tested your project, and I get all the expected answers
(301, 302, 404 & 200).
libcurl (the library used by gb.net.curl) has a flag to automatically
follow http redirections, but it is disabled by default.
So I don't understand the result you have. Which version of libcurl do
you use on your system?
--
Benoît Minisini
More information about the User
mailing list