Skip to content

Encode URL-encoded form field names - #582

Merged
ryber merged 1 commit into
Kong:mainfrom
AryanRG:fix/urlencoded-form-field-names
Oct 17, 2026
Merged

ryber merged 1 commit into
Kong:mainfrom
AryanRG:fix/urlencoded-form-field-names

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

What changes

Encode application/x-www-form-urlencoded field names with the configured charset, just as values are encoded. A raw name such as a&b currently creates separate decoded fields; the corrected wire name a%26b remains one field. This affects the current 4.x BodyBuilder path, including synchronous and asynchronous form posting. Multipart and raw request bodies are unchanged.

The changelog notes the compatibility effect: callers that pre-encoded names to work around the old behavior should pass the original raw name instead.

Verification

  • Public-API loopback probe: four of five cases fail on the unchanged base; all five pass with the fix.
  • New exact-wire unit cases and behavior tests cover reserved characters, Unicode, explicit charset, repeated names, and synchronous/asynchronous requests.
  • Full local Maven reactor verify passed across all eight modules on JDK 25, including Checkstyle. The focused core and form-related behavior run passed 245 distinct tests.
  • Independent final patch review found no P1/P2 blocker.

Hosted CI has not completed. The public 3.14.5 artifact passed the same five-case probe and is not claimed affected. AI assistance was used to investigate, implement, test, and review this patch.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ryber ryber left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice! Thanks for the contribution, this looks great. I'll cut a release with this shortly

@ryber
ryber merged commit 3d1d8ce into Kong:main Oct 17, 2026
@ryber

ryber commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

4.10.2 is out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants