-
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 Reactive client hangs for HTTP 401 responses #12652
Comments
@bclozel you need to swap these 2 lines: httpClient.getProtocolHandlers().remove(WWWAuthenticationProtocolHandler.NAME);
httpClient.start(); to be: httpClient.start();
httpClient.getProtocolHandlers().remove(WWWAuthenticationProtocolHandler.NAME); I agree that your code is more intuitive, but for historical reasons we add the Having said that, we do have a bug, as your test should have worked (with The issue is that |
Fixed ResponseListeners.emitEvents() to emit the "contentSource" event in all cases. Signed-off-by: Simone Bordet <[email protected]>
* Added test case for jetty/jetty.project#12652. Signed-off-by: Simone Bordet <[email protected]>
Jetty version(s)
org.eclipse.jetty:jetty-reactive-httpclient:4.0.8
Jetty Environment
core
Java version/vendor
(use: java -version)
openjdk version "17.0.13" 2024-10-15 LTS
OS type/version
macOS Sequoia 15.2 (24C101)
Description
When receiving an HTTP 401 response, the Jetty HTTP reactive client hangs and never publishes the response.
How to reproduce?
The subscriber times out waiting:
Am I misusing the reactive API in this case? Note that changing the URL to "https://httpbin.org/status/404" works as expected.
The text was updated successfully, but these errors were encountered: