Repository navigation
Rewrite url after running all remap plugins - #4531
Conversation
|
This has been a mess for a while, but I think this also needs to be discussed on the mailing list, to make sure we don't get surprises. |
|
OK. I will send mail about this problem to dev mailing list. |
|
[approve ci] |
|
My one concern was that |
|
|
||
| private: | ||
| unsigned int _cur = 0; | ||
| unsigned int _rewriten = 0; |
There was a problem hiding this comment.
This is minor, but could we name the member _rewritten with two ts?
| if (_rewriten == 0) { | ||
| Debug("url_rewrite", "plugin did not change host, port or path, copying from mapping rule"); | ||
| url_rewrite_remap_request(_s->url_map, _request_url, _s->hdr_info.client_request.method_get_wksidx()); | ||
| } |
There was a problem hiding this comment.
We are moving and then duplicating this code. Should we pull this out into its own function or is it OK as-is?
|
I did not notice that this had been merged while I was reviewing it. |
Described at #2877
When we configure remap.config like the following snippet, the second remap plugin using
rri->requestUrlget post-remap url information from ATS.The cause of this behavior is ATS executes
url_rewrite_remap_requestfunction after running the first remap plugin.Therefore, behavior of a remap plugin as the first plugin is different from that as the second plugin.
I think ATS should execute all remap plugins and then rewrite url.