-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netty container disregards path component of baseUri #4046
Comments
I agree See Line 122 in 8c60fd2
To me it seems like there are two bugs in that line:
|
mcserra
added a commit
to mcserra/jersey
that referenced
this issue
Feb 2, 2020
Signed-off-by: Miguel Serra <Miguel.Serra@criticaltechworks.com>
mcserra
added a commit
to mcserra/jersey
that referenced
this issue
Feb 2, 2020
Signed-off-by: Miguel Serra <Miguel.Serra@criticaltechworks.com>
mcserra
added a commit
to mcserra/jersey
that referenced
this issue
Feb 3, 2020
Signed-off-by: Miguel Serra <Miguel.Serra@criticaltechworks.com>
mcserra
added a commit
to mcserra/jersey
that referenced
this issue
Feb 19, 2020
Signed-off-by: Miguel Serra <Miguel.Serra@criticaltechworks.com>
mcserra
added a commit
to mcserra/jersey
that referenced
this issue
Mar 20, 2020
Signed-off-by: Miguel Serra <Miguel.Serra@criticaltechworks.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No matter, which path component is specified in the baseUri when creating the server via org.glassfish.jersey.netty.httpserver.NettyHttpContainerProvider#createHttp2Server (probably the same for
createServer
?), all the resources are located relative to "/".e.g. use a
@Path("example")
resource together withcreateHttp2Server(URI.create("http://localhost:13333/abc/"), rc, ...)
The client sees the resource wrongly located at "http://localhost:13333/example".
Using the debugger, I found the problem to be in org.glassfish.jersey.netty.httpserver.JerseyHttp2ServerHandler#createContainerRequest . The issue is, that it creates the
requestUri
from the baseUri + the path from the HTTP header, so it believes, the HTTP request was for "http://localhost:13333/abc/example".Note: Please compare this with
GrizzlyHttpServerFactory.createHttpServer(URI.create("http://localhost:13333/abc/", rc, ...)
, which behaves correctly. (There, the client sees the resource at "http://localhost:13333/abc/example")Versions:
The text was updated successfully, but these errors were encountered: