Vladimir Sitnikov created HTTPCLIENT-2359: ---------------------------------------------
Summary: Retry HTTP requests if server closes connection before sending status line as per RFC 2068, 8.2 Key: HTTPCLIENT-2359 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2359 Project: HttpComponents HttpClient Issue Type: Improvement Components: HttpClient (classic) Affects Versions: 4.5.14 Reporter: Vladimir Sitnikov See https://www.rfc-editor.org/rfc/rfc2068#section-8.2 {quote}if an HTTP/1.1 client has seen an HTTP/1.1 or later response from the server, and it sees the connection close before receiving any status from the server, the client SHOULD retry the request without user interaction so long as the request method is idempotent (see section 9.1.2); other methods MUST NOT be automatically retried, although user agents MAY offer a human operator the choice of retrying the request..{quote} I'm not an expert in HTTP / RFC, however, it looks like Httpclient should retry idempotent methods in case it receives EOF instead of a status line. As far as I understand, the only way to configure Httpclient to detect closed connections is to configure {{connectionManager.setValidateAfterInactivity}}, however, it is more like a workaround since the server can close connections at arbitrary time (e.g. it can even close the connections within a couple of seconds if there's a huge connection demand). I suggest Httpclient should implement rfc2068, and it should retry (reconnect) in case it observes EOF before receiving the status line. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org