[
https://issues.apache.org/jira/browse/TS-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14579121#comment-14579121
]
Sudheer Vinukonda edited comment on TS-3656 at 6/9/15 3:54 PM:
---------------------------------------------------------------
[~zwoop] clarified the text and differences in the older and newer RFC
versions. Basically, it looks like in HTTP/1.0, a POST method must always be
converted to GET/HEAD in a redirect follow, while in HTTP/1.1 or later, the
method may or may not be modified (i.e both POST or GET is allowed in a
redirect follow). Either way, it seems like, there's some amount of meaningful
(feature) work required to make redirect follow work with POST.
The bigger issue to deal with for redirects during POST (as explained in the
link I posted in the previous comment) is whether or not the body be
resubmitted during the redirect follow. Since, POST is not idempotent, the
resubmission of body may result in double charging a client, for instance. Note
that this issue exists regardless of whether the method is modified to GET/HEAD
or not. In fact, if the method is modified to GET/HEAD, can the body be even
sent in the request?
was (Author: sudheerv):
[~zwoop] clarified the text and differences in the older and newer RFC
versions. Basically, it looks like in HTTP/1.0, a POST method must always be
converted to GET/HEAD in a redirect follow, while in HTTP/1.1 or later, the
method may or may not be modified (i.e both POST or GET is allowed in a
redirect follow). Either way, it seems like, there's some amount of meaningful
(feature) work required to make redirect follow work with POST.
> Activating follow redirection in send server response hook does not work for
> post
> ---------------------------------------------------------------------------------
>
> Key: TS-3656
> URL: https://issues.apache.org/jira/browse/TS-3656
> Project: Traffic Server
> Issue Type: Bug
> Components: HTTP
> Reporter: Susan Hinrichs
> Assignee: Susan Hinrichs
> Fix For: 6.0.0
>
>
> If you have a plugin on the TS_HTTP_SEND_RESPONSE_HDR_HOOK, calls
> TSHttpTxnFollowRedirect(txn, 1), redirecting a POST request will fail.
> In the not so bad case, the POST request will be redirected to the new
> location, but the POST data will be lost.
> In the more bad case, ATS will crash.
> The issue is that the post_redirect buffers are freed early on. One could
> delay the post_redirect deallocation until later in the transaction.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)