-
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 redirects SOAP POST requests to GET requests if URL does not end with / #10699
Comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Thanks for the report, and you are entirely correct; this is a bug that was introduced in Jetty 12. I've created a pull request that fixes this problem: #10710 Thanks! |
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Hello, ive taken a look at your pull request and it appears to me you only changed Building and integrating your branch would sadly have taken way to much time as the build system i am using for the soap project requires me to have all dependencies available in a external maven repository. To test your changes I have just set a breakpoint before super.setHandler (line 48 in jetty 12.0.2) and ran setAllowNullPathInContext(true); in a debugger evaluation. Looking forward to jetty 12.0.3. Sincerely |
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
) * #10699 allow POSTing with a URL not ending with '/' to jax-ws endpoints Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Jetty version(s)
12.0.2
Jetty Environment
ee10+http SPI+jaxws(SOAP)
Java version/vendor
(use: java -version)
17 (does not matter, broken with any java 17 version)
OS type/version
windows 11
Description
I use Jetty Http SPI to host a soap server and the soap server has to have many different endpoint WSDL's
for example 1 endpoint is located at
http://localhost:12345/endpointA
the next may be at
http://localhost:12345/endpointB
These endpoints are published via
javax.xml.ws.Endpoint.publish("http://localhost:12345/endpointA",....)
If a SOAP client now sends a post request to a endpointA Jetty redirects it to
http://localhost:12345/endpointA/
This is not a problem, the soap client obliges but the soap client then repeats the request with a GET instead of a
POST. This causes jaxws to respond with the WSDL instead of actually calling the endpoint.
If the soap client directly makes its request to "http://localhost:12345/endpointA/" with a slash at the end
it all works out and the endpoint is called all good.
With Jetty 11.0.16 the soap client could call either http://localhost:12345/endpointA/ or http://localhost:12345/endpointA
I did not change the versions of any of the soap libraries when updating jetty from 11.0.16 to 12.0.2
In my opinon jetty should not redirect
http://localhost:12345/endpointA to http://localhost:12345/endpointA/
http://localhost:12345/endpointA should just call the endpoint like it did with jetty 11
The server is started in embeeded mode:
This behavior of the redirect also occurs with just 1 endpoint.
The redirect can also be observed in a plain web browser, soap client is not even "needed".
It is also very much possible that i am simply making some mistake here, like some property that now has to be set that I have not set...
Soap libraries used:
How to reproduce?
see above
The text was updated successfully, but these errors were encountered: