mkurz opened a new pull request, #884: URL: https://github.com/apache/httpcomponents-client/pull/884
This fixes [HTTPCLIENT-2433](https://issues.apache.org/jira/browse/HTTPCLIENT-2433). When an HTTP/2 authentication challenge completed before the request body had finished, `H2AsyncMainClientExec` previously notified the execution chain that the exchange was complete immediately. The authentication handler could then release and reuse the same repeatable entity producer while the original HTTP/2 stream was still consuming it, corrupting the replayed request body. The HTTP/2 execution handler now completes the exchange only after both request output and response input have terminated. It also handles a graceful `RST_STREAM(NO_ERROR)` after a complete response as request-side termination, allowing authentication replay to continue without hanging. Regression coverage includes: - Uploading a deterministic 2 MB file through challenge-based Basic authentication and verifying that the replay contains the exact original bytes. - A body-less `401` followed by `RST_STREAM(NO_ERROR)`, verifying that the authenticated retry completes with the exact 2 MB request body. Reproducer: https://github.com/mkurz/apache-httpclient5-h2-auth-replay-reproducer Tests: - HTTP/2 authentication suites with and without TLS: 28 tests, 0 failures - Graceful-reset regression test repeatedly verified with and without TLS -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
