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

Allow semicolon in the href of Link header #5464

Open
wants to merge 4 commits into
base: master
from

Conversation

@ibnesayeed
Copy link

ibnesayeed commented May 19, 2020

Semicolons are valid characters in URIs, splitting them while parsing the Link header results in unexpected token and wrong url attribute (notice ;oldid=934259284 portion the below example).

<https://en.wikipedia.org/w/index.php?title=COVID-19_pandemic&amp;oldid=934259284>; rel="original", <https://waybackassets.bk21.net/timemap/link/https://en.wikipedia.org/w/index.php?title=COVID-19_pandemic&amp;oldid=934259284>; rel="timemap"; type="application/link-format"

This PR attempts to fix current parsing issue and also renames a variable to better reflect the purpose of it.

I would note here that this parser still is far from perfect and can be better implemented using state machine.

ibnesayeed added 4 commits May 19, 2020
@ibnesayeed
Copy link
Author

ibnesayeed commented Aug 10, 2020

@nateprewitt is there anything we can to do to get it merged?

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

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.