From 8eb5d9fc30f6e21a77123a452c882b81628135b9 Mon Sep 17 00:00:00 2001 From: tingfengshiye Date: Fri, 1 Aug 2025 11:07:58 +0800 Subject: [PATCH] fix query parameter value (#3614) --- httpx/_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/httpx/_client.py b/httpx/_client.py index 13cd933673..a570280d0a 100644 --- a/httpx/_client.py +++ b/httpx/_client.py @@ -234,6 +234,8 @@ def trust_env(self) -> bool: def _enforce_trailing_slash(self, url: URL) -> URL: if url.raw_path.endswith(b"/"): return url + if url.query: + return url.copy_with() return url.copy_with(raw_path=url.raw_path + b"/") def _get_proxy_map(