I’d like to take a little step back ask about what is the root causing about this change:
in the origin design 1, the remap plugin works in ordered, which means you can stop(consider it done) remapping at any plugin if you want, and the following plugins will not run after. 2, the remap plugin works in stacks, which means the seconds plugin will continue work on the URL which is rewritten in the first plugin. when you talking about the origin URL, there is always a pristine URL you can copy, if you really want, so the second plugin can see the origin un-mapped URL. this pristine URL is design for logging, but I think you can take it for your purpose if you like so, here rise my question: can the pristine URL full file your second plugin needs? if so, can we keep the origin design? - Yongming Zhao 赵永明 > 在 2018年11月5日,上午11:06,Takuya Kitano <tkit...@yahoo-corp.jp> 写道: > > Hi, > > I’d like to propose a change about the timing that ATS runs remap plugins. > > Currently, we configure remap.config like the following snippet, > and each plugins use `rri->requestUrl`, > the behavior of a remap plugin as the first plugin is different from that as > the second plugin. > > ``` > map http://before-remap.com/ http://after-remap.com/ @plugin=<first > plugin>.so @pparam=... @plugin=<second plugin>.so @pparam=... > ``` > > In detail, the first plugin get pre-remapped url information from > `rri->requestUrl`, > but the second plugin get post-remapped one. > > The cause of this behavior is ATS executes `url_rewrite_remap_request` > function after running the first remap plugin. > > My proposal is that ATS should execute all remap plugins and then rewrite url. > > More ditails are in > - Issue : https://github.com/apache/trafficserver/issues/2877 > - Pull Request : https://github.com/apache/trafficserver/pull/4531 > > > What do you think about this? > > Thank you. >