Community
Participate
Working Groups
Build Identifier: 7.4.5-7.5.1 waitForDone() never returns if onException,onConnectionFailed when RedirectListener is running. I noticed that my exchange wasn't getting called if the next request after a 301/302 redirect fails with onConnectionFailed() or onException(). Looks like RedirectListener disables deligating and then doesn't specifically re-enable it in these cases: HttpEventListenerWrapper ends up dropping the onException,onConnectionFailed() on the floor. Here is an extract from a test case which can reproduce this: bs.accept do |sock| sock.write "HTTP/1.1 302 Found\r\n" sock.write "Location: http://localhost:54929/no-exist\r\n" sock.write "Content-Type: text/plain\r\n" sock.write "Transfer-Encoding: chunked\r\n" sock.write "\r\n" sock.write "FF3DF\r\n" sock.write "An incomplete chunk" sock.write "An incomplete chunk" sock.write "An incomplete chunk" sock.close end waitForDone() never returns in this case. I was able to fix this by overriding RedirectListener with the (patch attached) methods. Reproducible: Always
Created attachment 204141 [details] Implement-RedirectListener.onException-on.patch
This mirrors: https://jira.codehaus.org/browse/JETTY-1421
applied, thanks much