Repository navigation
URL constructor drops final-segment semicolon parameters #1126
Unanswered
AryanRG
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Constructing a URL from a complete string drops valid final-segment path parameters before a request is sent:
The expected target is
b'/items;version=2?x=1'. The URL constructor usesurllib.parse.urlparse()but assembles the target withoutparsed.params;urlsplit()retains the complete path. This also affects an empty trailing semicolon (/items;). Explicitly constructedURL(..., target=...)values already preserve it.Local reproduction on the current
masterhead (10a658221deb38a4c5b16db55ab554b0bf731707) confirmed the altered request target with sync and async HTTP/1.1 requests, direct and through a forward proxy. A focused one-line parser change and regression tests pass the local suite andscripts/check(230 tests passed, with six pre-existing XPASS results). No PR has been opened.Is retaining those semicolon path parameters the intended behavior, and would a focused patch be welcome?
All reactions