[Gambas-user] [Git][gambas/gambas][master] HttpClient.Redirect is a new boolean property that enables automatic redirection following.

T Lee Davidson t.lee.davidson at gmail.com
Fri Mar 2 23:17:01 CET 2018


On 03/01/2018 04:52 PM, Benoît Minisini via User wrote:
> 
>       Benoît Minisini pushed to branch master at Gambas / gambas <https://gitlab.com/gambas/gambas>
> 
>         Commits:
> 
>   * *3f2838c6 <https://gitlab.com/gambas/gambas/commit/3f2838c60971455a560f1cfa613eeff2e3bc9929>*
>     by gambas /at 2018-03-01T21:51:48Z/
> 
>     HttpClient.Redirect is a new boolean property that enables automatic redirection following.
> 
>     [GB.NET.CURL]
>     * NEW: HttpClient.Redirect is a new boolean property that enables automatic redirection following.
> 

This new feature does appear to return the correct response body. Awesome!

However, HttpClient.Code and HttpClient.Reason return the redirect code and reason, ie. "301 Moved Permanently". Maybe that's by
design.

The response headers also contain two response codes, "HTTP/1.1 301 Moved Permanently" and "HTTP/1.1 200 OK", when retrieving
http://www.windpowermonthly.com (non-SSL) which is forced to SSL.

[response_headers]
HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=UTF-8
Location: https://www.windpowermonthly.com/
Server: Microsoft-IIS/7.5
X-HMIO-Server: HBI-NET-2
X-Powered-By: ASP.NET
Access-Control-Allow-Origin: *
Date: Fri, 02 Mar 2018 22:08:06 GMT
Content-Length: 156
Set-Cookie: BIGipServerPOOL-HBI-DOTNET=981641408.20480.0000; path=/
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Vary: User-Agent
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
Set-Cookie: CM_AT=q1R4gixxM2nSLukBYVo8X+NjY6D2ja/PqdYSQvYKm+r3sdF9aIVBbMMV7wD5ZaNWrppBqjgA/tc6V61Yx8AyPXYAj6lb9tHKhN8XUk
uMQLqKVbRIkdo+NQ==; domain=.windpowermonthly.com; expires=Sat, 02-Mar-2019 22:08:07 GMT; path=/; HttpOnly
X-HMIO-Server: HBI-NET-2
X-Powered-By: ASP.NET
Access-Control-Allow-Origin: *
Date: Fri, 02 Mar 2018 22:08:07 GMT
Content-Length: 47493
[/response_headers]


-- 
Lee


More information about the User mailing list