-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
jetty-http-spi: Filters in HttpContext/JettyHttpContext ignored, implementation missing #9125
Comments
Congrats, you are officially the first person (since 2011) to use Java's built-in HTTP-Server's Filter functionality with Jetty! (yes! really!) Original code addition for jetty-http-spi to Jetty 9.0.0 ... Current codebase for This was never implemented. This would be a very low priority for us. Your options:
Typically, people that care about Authentication use the Servlet Layer in Jetty to accomplish this (for Jetty 12, this would be the "core" layer instead) |
Wow! This is a SOAP interface using the JAX-WS framework, which has the ability to work together with the built-in server. This is a convenient solution for reasonable traffic between internal services. I guess that there is an alternative with servlets, and with the directions you gave me, I likely will find a solution. From my perspective, I don't mind if you close the issue as "won't fix", but on the other hand it is questionable whether to retain the submodule at all in future releases if it is only implemented halfhearted. |
Jetty operates with many JAX-WS frameworks, none of them use Jetty via the |
I guess so. The whole effort was to solve a problem with the built-in server and was thought as a quick & dirty solution. We have used Tomcat standalone instances with web applications in the past for such purposes, so we miss some experience in respect to embedded Jetty and SOAP. However, I'm confident to solve it, thanks! |
The reason this is Low Priority for us ... Looking at maven download statistics for If we look a other artifacts for the same time period:
|
@demonti hello, may I ask you to give me a code example to reproduce the bug, I will work on the ticket. |
This issue has been automatically marked as stale because it has been a |
This issue has been closed due to it having no activity. |
I am also running into this. Will this get fixed? |
It will eventually, but it is a very low priority. We have few users using the server this way and absolutely no commercial customers. I expect that once 12.1 is released, we might have done more time to look at this. But we are very much open to community contributions to resolve this. |
Jetty version(s)
Jetty 9.x is now at End of Community Support
I discovered this in Jetty 9.4, but the problem obviously exists also in 10.x, 11.x
Java version/vendor
(use: java -version)
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)
OS type/version
Linux mclane 5.19.0-26-generic #27-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 23 20:44:15 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 22.10
Description
I ported code that used Java's built-in HTTP-Server (
com.sun.net.httpserver
) to Jetty's adapter. The code usesHttpContext.getFilters()
to add two filters, one dealing with authentication, another with input decompression (we are using HTTP POST with compressed data).I discovered that both filters do not work. The code is not executed. I downloaded the code for 9.4.x and 10.x from Github and saw that the
JettyHttpContext
, which extends Java'sHttpContext
, only stores the filters, but does not process the filters on its own. It is merely a container holding all the data. The only access to the filters is via thegetFilters()
method. However, nowhere in the Jetty code this method is ever called. Filters are obviously not implemented. I guess this is not intentional. If it actually is, I would highly appreciate a hint on how filtering should be implemented instead.How to reproduce?
Check the call hierarchy of the
JettyHttpContext.getFilters()
method and see that it is not called. Thus, any filters added by user code will be ignored.The text was updated successfully, but these errors were encountered: