You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parsing an URI with HttpUri.from(String uri) throws an "IllegalArgumentException: Bad authority", when the path is empty (path-empty), but a query is present in the URI. E.g. "http://example.com?id=123". According to https://datatracker.ietf.org/doc/html/rfc3986#section-3.3 an empty path followed by a query section is valid though.
Thanks for looking into this issue!
How to reproduce?
Run HttpURI.from("http://example.com?id=123")
See error
The text was updated successfully, but these errors were encountered:
| Welcome to JShell -- Version 17.0.11
| For an introduction type: /help intro
jshell> var uri = new URI("http://example.com?id=123")
uri ==> http://example.com?id=123
jshell> uri.getPath()
$2 ==> ""
jshell> uri.getQuery()
$3 ==> "id=123"
jshell> uri.getAuthority()
$4 ==> "example.com"
Jetty version(s)
12.0.14
Jetty Environment
core
Java version/vendor
(use: java -version)
21.0.2+13-LTS
OS type/version
Ubuntu 22.04
Description
Parsing an URI with HttpUri.from(String uri) throws an "IllegalArgumentException: Bad authority", when the path is empty (path-empty), but a query is present in the URI. E.g. "http://example.com?id=123". According to https://datatracker.ietf.org/doc/html/rfc3986#section-3.3 an empty path followed by a query section is valid though.
Thanks for looking into this issue!
How to reproduce?
HttpURI.from("http://example.com?id=123")
The text was updated successfully, but these errors were encountered: