I don’t normally comment, but feel like I need to chime in here. I agree in keeping with the stack behavior. This change has the potential to break a lot of plugin logic and will cause a lot of work across many dev teams that maintain many plugins. The pristine URL should be used in subsequent plugins as needed.
Having said that, I am also interested to know and understand the cause for wanting this behavior. -Bret > On Dec 1, 2018, at 20:15, Yongming Zhao <ming....@gmail.com> wrote: > > 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. >> >