TS-4396: fix number_of_redirections off-by-one#786
TS-4396: fix number_of_redirections off-by-one#786mingzym wants to merge 1 commit intoapache:masterfrom
Conversation
| } | ||
|
|
||
| redirection_tries++; | ||
|
|
There was a problem hiding this comment.
Right below here, we repeat the test on number_of_redirections with is_redirect_required(). The condition is different however, since this code will not redirect withnumber_of_redirectionsandis_redirect_required()`` will.
I don't think that this is the right place to increment redirection_tries, though it is an improvement. How about incrementing it in redirect_request()? Or at least defer until we know we are actually going to call redirect_request.
We should restructure this function like this:
if (!is_redirect_required()) {
tunnel.deallocate_redirect_post_buffers();
enable_redirection = false;
return;
}
...There was a problem hiding this comment.
hmm, looks like better to do redirection_tries++ when setting redirect_in_process = true, if you consider a really redirection. good catch.
|
[approve ci] |
|
Closing since there is a new PR for this #2092 |
please test