arturobernalg commented on PR #710: URL: https://github.com/apache/httpcomponents-client/pull/710#issuecomment-3592491222
> @arturobernalg This change-set attempts to enforce a deadline until receipt of a response head. The idea is to enforce a deadline to the_total_ message exchange including transmission of request and response content entities. Even now the change-set adds a considerable amount of ugliness and this is just a start. I am not sure it is worth it. What is your reason for doing all this? @ok2c My intention was to cover the problematic cases (stuck lease / connect / first-byte wait) without extra threads or global schedulers, and to keep the plumbing contained. You are right that the current change only enforces the deadline while HttpClient is in control of the exchange: leasing the connection, connecting, writing the request and waiting for the response head. Once the response has been handed off to user code and the entity is being streamed, we still rely on the existing socket timeout; we do not try to track total wall-clock time for the entire body transfer. Enforcing the deadline for the full message exchange including entities would mean threading the deadline into entity producers/consumers and possibly wrapping the content stream, which I think becomes quite invasive for the benefit it adds. I'm fine with dropping this approach and close the ticket -- 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]
