-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Referrer-Policy Header #920
Conversation
/cc @jdm |
This isn't quite right - this still only looks at the very last comma-separated values and ignores the others. We want to return the rightmost value that is successfully recognized - this implies that we either need to iterate left to right and track the most recent successful parse, or iterate right to left and return the first value that is successful. |
Ah I see. I think the ideal way to do that would be to scan right to left checking the value each time and returning the first valid one. I will make that change. Thanks for your input. |
@gsquire it would also help here to include a test in this module of this behavior |
8eb1797
to
f518583
Compare
I don't think my solution is elegant so I am open to suggestions on improving it. I also rebased onto master. |
f518583
to
f7e7723
Compare
f7e7723
to
7b558ae
Compare
I refactored the ugly flow I had before. It should be good to go now. |
This looks good to me! |
Thanks! |
Instead of parsing one value in the
ReferrerPolicy
struct, allow for a list and use the last value. I believe this is what the ticket mentions, but I could have misinterpreted.Closes #882