Hi-

I have observed that if there are multiple plugins in a remap plugin chain, 
TSHttpTxnEffectiveUrlStringGet() in the 1st plugin gets the unmapped URL, while 
in all other plugins it gets the mapped URL. Of course we can instead use 
TSHttpTxnPristineUrlGet() to get the original URL. But many plugins like 
regex_remap and cacheurl use this EffectiveUrl as request URL and thus they may 
get either mapped or unmapped URL depending on the position they are in the 
plugin chain.

ATS code shows that in RemapPlugins::run_single_remap(), in many cases it 
invokes url_rewrite_remap_request() to rewrite the request URL after the 1st 
plugin is run. Even the first plugin does nothing, the request URL is still 
modified.

Why ATS needs the above logic (“After running the first plugin, rewrite the 
request URL.”)? If this logic is required, is it valid that an empty plugin 
which does nothing should affect the request URL?

Thanks,
John

Reply via email to