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

Added System.Uri.EscapeDataString for parameter names in query string #2338

Merged
merged 1 commit into from Aug 2, 2019

Conversation

@mirroj
Copy link
Contributor

commented Jul 31, 2019

Fix for Issue #2337
The following is extracted from section 3.2.2 of RFC 3986 :

A host identified by an Internet Protocol literal address, version 6
[RFC3513] or later, is distinguished by enclosing the IP literal
within square brackets ("[" and "]"). This is the only place where
square bracket characters are allowed in the URI syntax.

The square brackets that appear in query string should be escaped. For example:
GET test?page[number]=1&page[size]=1

Should be escaped to:
GET test?page%5Bnumber%5D=1&page%5Bsize%5D=1

@RicoSuter RicoSuter merged commit d04d0dd into RicoSuter:master Aug 2, 2019

1 check passed

NSwag - CI Build #20190731.3 succeeded
Details
@RicoSuter

This comment has been minimized.

Copy link
Owner

commented Aug 2, 2019

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.