-
Notifications
You must be signed in to change notification settings - Fork 11
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
Handle escaped URI-Rs #146
Conversation
Closes #110
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you make sure that the URLs with spaces in them are working as expected, even after escaping?
Other than that, it looks okay, but I would prefer if the blank lines were removed, because it looks odd to have one function in the whole code base that has black space while others don't.
@ibnesayeed I removed the extraneous spacing. Regarding testing URLs with spaces in them, the browser converts the space to %20 before submission and curl rejects the URL with a space, i.e.,
|
Test with Moreover, I would also test |
...results in https://www.webarchive.org.uk/wayback/archive/timemap/link/http://example.org/space%20test.html from the MemGator log.
...produces https://www.webarchive.org.uk/wayback/archive/timemap/link/http://example.org/test.html?sawood alam=ibnesayeed" from the MemGator log.
...produces https://www.webarchive.org.uk/wayback/archive/timemap/link/http://example.org/test.html?sawood+alam=ibnesayeed from the MemGator log. Are the results of any of these variations incorrect to you, @ibnesayeed? |
Please try:
To see if you get |
curl -i "http://localhost:1208/timemap/link/https://google.com/?q=united%20states" returns a 404 from my local MemGator instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try adding this explicit replacement, which might take care of the issue.
Co-authored-by: Mat Kelly <[email protected]> Co-authored-by: Sawood Alam <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Closes #110
I also tested URIs that would get decoded as spaces, e.g.,
curl -i "http://localhost:1208/timemap/link/http%3A%2F%2Fexample.org%2F%20index.html"
The %20 remains in the URIR after being decoded.