Skip to content

Commit 8eb5d9f

Browse files
committed
fix query parameter value (#3614)
1 parent 4fb9528 commit 8eb5d9f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

httpx/_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ def trust_env(self) -> bool:
234234
def _enforce_trailing_slash(self, url: URL) -> URL:
235235
if url.raw_path.endswith(b"/"):
236236
return url
237+
if url.query:
238+
return url.copy_with()
237239
return url.copy_with(raw_path=url.raw_path + b"/")
238240

239241
def _get_proxy_map(

0 commit comments

Comments
 (0)