-
Notifications
You must be signed in to change notification settings - Fork 375
Closed
Description
When sending a URL with query string at the end, e.g. /status?foo=bar, the client seems to append the param twice, once incorrectly (with URL encoding), and a second time correctly, i.e. /status%3Ffoo=bar?foo=bar. This breaks the request, because now the path looks to be a different from what the server expected, and the server responds with 404.
Example, send this URL from RestClient 4.0.2:
http://localhost:8080/status?foo=bar
The logs on server-side:
127.0.0.1 - - [28/Apr/2025:21:02:42 +0000] "GET /status%3Ffoo=bar?foo=bar HTTP/1.1" 404 18 "-" "Apache-HttpClient/5.4.1 (Java/17.0.13)" 2
The problem only occurs when a query param is included. More examples:
127.0.0.1 - - [28/Apr/2025:21:02:39 +0000] "GET /status HTTP/1.1" 200 179 "-" "Apache-HttpClient/5.4.1 (Java/17.0.13)" 18
127.0.0.1 - - [28/Apr/2025:21:02:42 +0000] "GET /status%3Ffoo=bar?foo=bar HTTP/1.1" 404 18 "-" "Apache-HttpClient/5.4.1 (Java/17.0.13)" 2
127.0.0.1 - - [28/Apr/2025:21:02:46 +0000] "GET /status%3F? HTTP/1.1" 404 18 "-" "Apache-HttpClient/5.4.1 (Java/17.0.13)" 2
127.0.0.1 - - [28/Apr/2025:21:02:50 +0000] "GET /status%3Fasdf?asdf HTTP/1.1" 404 18 "-" "Apache-HttpClient/5.4.1 (Java/17.0.13)" 1
127.0.0.1 - - [28/Apr/2025:21:02:52 +0000] "GET /status%3Ffoo?foo HTTP/1.1" 404 18 "-" "Apache-HttpClient/5.4.1 (Java/17.0.13)" 2
127.0.0.1 - - [28/Apr/2025:21:02:54 +0000] "GET /status%3Ffoo=bar?foo=bar HTTP/1.1" 404 18 "-" "Apache-HttpClient/5.4.1 (Java/17.0.13)" 2
The problem doesn't occur with older 3.7.2.
Metadata
Metadata
Assignees
Labels
No labels