Hello,
I have not 100% tested this, but this is the behaviour I'm seeing, making me think it is a possible bug.
Request: http://www.somesite.com/something.html
------------------------------------------------
Response:
Date: Sat, 13 May 2017 10:02:08 GMT
Set-Cookie: lang=english; domain=.somesite.com; path=/
Set-Cookie: code=12345abcde; domain=.somesite.com; path=/; expires=Sun,
14-May-2017 10:02:08 GMT
Location: //www.somesite.com/foebar.php
Connection: close
Transfer-Encoding: chunked
Content-Type: application/cgi
------------------------------------------------
rest.ResponseStatusCode = 302
rest.RedirectUrl() ==> http://www.somesite.com/foebar.php
Request: http://www.somesite.com/foebar.php
NOTE: Cookie NOT set
------------------------------------------------
Response:
exactly the same as above (except different times)
------------------------------------------------
rest.ResponseStatusCode = -1
rest.RedirectUrl() ==> http://www.somesite.com/foebar.php
I expect an error text, due to ResponseStatusCode = -1. However:
ChilkatLog:
RedirectUrl:
DllDate: May 12 2017
ChilkatVersion: 9.5.0.67
UnlockPrefix: *REMOVED*
Architecture: Little Endian; 64-bit
Language: .NET 4.6 / x64
VerboseLogging: 1
url: http://www.somesite.com/foebar.php
Success.
--RedirectUrl
--ChilkatLog
So. My assumption is that the responseStatusCode is set to -1 due to the fact that the new location URL is the same as the previous. Ifso, that is a bug. The page was correctly loaded and thus statuscode 302 should be given (in this situation). Hooever, perhaps with a remark in the verbose logging that the new URL is the same as the previous one (This is the end-user's problem)
In the above example, the server wants you to set a cookie, if not it keeps requesting you to do so untill you ave set it.
Which brings me to the request if it is possible to add cookie support (that is available in the HTTP module) to the REST module? Clearly I did not build my cookie integration very well, causing the problem to surface... I found that this has been requested before: http://www.chilkatforum.com/questions/11395/cookie-support-in-rest-module