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

Make POST/non-GET URL canonicalization consistent with pywb #58

Closed
tw4l opened this issue Jul 26, 2023 · 0 comments · Fixed by #68
Closed

Make POST/non-GET URL canonicalization consistent with pywb #58

tw4l opened this issue Jul 26, 2023 · 0 comments · Fixed by #68
Assignees

Comments

@tw4l
Copy link
Member

tw4l commented Jul 26, 2023

Related to webrecorder/specs#141

warcio.js and pywb have slightly different behavior in terms of how keys are handled.

For example for an input {"a": [[], {}, true, false, null, "", " ", 1, 1.0, -0.0]}, we get the following results in warcio vs pywb:

warcio's jsonToQueryString

2=true&3=false&5=&6=+&7=1&8=1&9=0

pywb

a=True&a.2_=False&a.3_=None&a.4_=&a.5_=+&a.6_=1&a.7_=1.0&a.8_=-0.0

There are two key differences:

  1. The a key is getting lost by warcio.js due to our current implementation of a replacer function passed to JSON.stringify. This needs to be addressed to consider full key paths.
  2. pywb is returning Pythonic values, which will be addressed in Canonicalize non-GET URLs with native JSON values pywb#859
@tw4l tw4l self-assigned this Jul 26, 2023
@tw4l tw4l moved this from Triage to Ready for Dev in Webrecorder Projects Jul 26, 2023
@tw4l tw4l moved this from Ready for Dev to Dev In Progress in Webrecorder Projects Jul 27, 2023
@tw4l tw4l moved this from Implementing to Ready in Webrecorder Projects Apr 1, 2024
@tw4l tw4l moved this from Ready to Implementing in Webrecorder Projects Apr 1, 2024
@tw4l tw4l moved this from Implementing to Ready in Webrecorder Projects Apr 1, 2024
@tw4l tw4l moved this from Ready to Implementing in Webrecorder Projects Apr 2, 2024
@tw4l tw4l moved this from Implementing to In Review in Webrecorder Projects Apr 8, 2024
@ikreymer ikreymer self-assigned this May 29, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done! in Webrecorder Projects Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done!
Development

Successfully merging a pull request may close this issue.

2 participants