Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin ordering changes remap URI even with empty plugin #4026

Closed
ezelkow1 opened this issue Jul 27, 2018 · 2 comments
Closed

Plugin ordering changes remap URI even with empty plugin #4026

ezelkow1 opened this issue Jul 27, 2018 · 2 comments

Comments

@ezelkow1
Copy link
Member

ezelkow1 commented Jul 27, 2018

While testing some things with cachekey I noticed that I was getting some odd results. If cachekey is the very first plugin listed in a remap then it gets the pristine url, however if it is not first then it will get the remapped url. We put in an empty header rewrite just to test this.

My curl:
curl 'http://localhost:8080/index.html' -vlsk -H 'Host: edge.invalid' -H 'X-Debug: X-Cache-key'

Produces expected result:
< X-Cache-Key: https://google.com/index.html

map / https://google.com/ @plugin=header_rewrite.so @pparam=/home/%USERNAME/empty @plugin=cachekey.so @pparam=--separator= @pparam=--remove-all-params=true @pparam=--remove-path=true @pparam=--capture-prefix-uri=/^([^?]*)/$1/

Non-expected:
< X-Cache-Key: http://edge.invalid/index.html

map / https://google.com/ @plugin=cachekey.so @pparam=--separator= @pparam=--remove-all-params=true @pparam=--remove-path=true @pparam=--capture-prefix-uri=/^([^?]*)/$1/

It would seem to me that we would want the first url, the one already remapped, to be what every plugin sees. In that case I have just used a header_rewrite with a touched empty file. This was seen on my own test build based on 7.1.4

@bryancall
Copy link
Contributor

If this is still an issue please reopen.

@gtenev
Copy link
Contributor

gtenev commented May 30, 2019

This issue should have been fixed by PR #4964 which implemented what was agreed on the dev mailing list - email thread "[PROPOSAL] Rewrite url after running all remap plugins" which resulted in a new proposal to "rewrite url before all remap plugins"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants