DZ-Jay wrote:
> If I understand your problem, what is happening is this:  You submit a
> Post request, the server responds with 302, the HttpCli automatically
> submits a Get request to the new location, but the server rejected it,
> ignored it, or processed it incorrectly because it was expecting a
> Post request:  With a Post request, the server will receive the data
> in the request body; while with a Get request it will receive it in
> the "query-string", which is in the request header.
> I haven't used HttpCli in years, so I don't know how the "follow"
> mechanism works, but if it only performs Get requests, then you must
> not set "follow", and perform the redirection using a new PostAsync
> request to the new location.

That appears correct, the THttpCli changes a POST to a GET request
when automatically redirecting. 

RFC1945 however say that this is wrong:

If the 302 status code is received in response to a request using
the POST method, the user agent must not automatically redirect the
request unless it can be confirmed by the user, since this might
change the conditions under which the request was issued.

Note: When automatically redirecting a POST request after
      receiving a 302 status code, some existing user agents will
      erroneously change it into a GET request.

Arno Garrels [TeamICS]

> dZ.
> --
> DZ-Jay [TeamICS]
To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to