Skip to content

v3.2: Update RFC1866 to WHATWG-URL for application/x-www-form-urlencoded #4905

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

Open
wants to merge 3 commits into
base: v3.2-dev
Choose a base branch
from

Conversation

handrews
Copy link
Member

This updates our reference for application/x-www-form-urlencoded. The question of whether it is strictly compatible is very hard to answer, as RFC1866 paraphrases RFC1738 incorrectly, and implementations that I can find that use these don't behave quite like either the paraphrase or the actual requirements. Which are hard to figure out in the first place.

Given that we are defining percent-encoding in terms of whether you can successfully decode the encoded string, this is compatible. If we think in terms of exactly what gets encoded, it's not, but also it's probably never been implemented "correctly" because I've never seen a library that percent-encoded every non-alphanumeric character (RFC1866's paraphrase), and the most strict reading of RFC1738 is problematic in terms of its successor, RFC3986, although all in weird corners that would take several more paragraphs to explain.

I think this update is an improvement, as it brings us in line with the current IANA-registered specification for form-urlencoded, and is less of a nightmare to try to understand by reading the source specifications.

  • schema changes are included in this pull request
  • schema changes are needed for this pull request but not done yet
  • no schema changes are needed for this pull request

@handrews handrews requested review from a team as code owners August 21, 2025 19:21
@handrews handrews added clarification requests to clarify, but not change, part of the spec param serialization Issues related to parameter and/or header serialization media and encoding Issues regarding media type support and how to encode data (outside of query/path params) labels Aug 21, 2025
ralfhandl
ralfhandl previously approved these changes Aug 22, 2025
@ralfhandl ralfhandl requested a review from a team August 22, 2025 07:59
mikekistler
mikekistler previously approved these changes Aug 22, 2025
Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍

Co-authored-by: Mike Kistler <[email protected]>
@handrews handrews dismissed stale reviews from mikekistler and ralfhandl via f0b3fa8 August 22, 2025 14:14
@ralfhandl ralfhandl requested review from mikekistler and a team August 22, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification requests to clarify, but not change, part of the spec media and encoding Issues regarding media type support and how to encode data (outside of query/path params) param serialization Issues related to parameter and/or header serialization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants