On Mon, 2020-02-17 at 21:28 +0100, Michael Osipov wrote:
> Folks,
> 
> I have continued to fiddle a bit more with the redirector in
> HttpClient 
> 5.0. I have modified my servlet code to respond with 307 from within
> a 
> Tomcat valve which immediately kicks in after "Expect: 100-continue".
> 
> There seems to be a bug in RedirectExec:
> 

...

> The client is sending the body "I am a checksum" also 100 has not
> been 
> issued, but 307. I have expected the client to follow the redirect
> and 
> retry. The request fails at the end because the HTTP entity has
> already 
> been consumed.
> 
> Ideas?
> 
> Michael
> 

Hi Micheal

I presume you no longer remember this discussion:

https://issues.apache.org/jira/browse/HTTPCORE-411

HttpClient 5.0 behaves differently compared to 4.x with regards to the
expect-continue handshake. What you are seeing is what is believed to
be RFC 7230 conformant behavior (not that I am very happy about it). 

What we could do, though, in this particular case is to disregard the
spec requirement given that the origin server has signaled its
intention to close the connection after the redirect by sending
`Connection: close` response header. 

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Reply via email to