On 05-06-2014 12:55, Angus Robertson - Magenta Systems Ltd wrote:
This change is now in SVN,

My understanding is that, when redirecting, the request method should revert to GET, for any method (POST, PUT, DELETE,...) and only maintain it when the redirect is of type 307 or 308.
The way you have code it only works for POST.

if (FRequestType = httpPOST) and not ((FStatusCode = 307) or (FStatusCode = 308)) then
        FRequestType  := httpGET;

My proposition was:

if (FRequestType <> httpGET) and not ((FStatusCode=307) or (FStatusCode=308)) then
        FRequestType  := httpGET;

although there is a lot of online debate over many
years about whether this change is allowed by the RFCs, at least without user
interaction, different browsers implement redirection in different way.

An "AllowRelocation" var parameter in the OnLocationChange event would help on this.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to