[ 
https://issues.apache.org/jira/browse/HTTPCORE-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17235727#comment-17235727
 ] 

ASF subversion and git services commented on HTTPCORE-626:
----------------------------------------------------------

Commit d1ddbdf0d7330f57f45c97d4dd28d821f7ff5cd4 in httpcomponents-core's branch 
refs/heads/5.0.x from Oleg Kalnichevski
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-core.git;h=d1ddbdf ]

HTTPCORE-626: in case of an unsuccessful `expect-continue` handshake do not 
make any attempts to keep the client connection in a consistent state if the 
server intends to close it on its end


> Don't send request body for "Expect: 100-continue" when servers closes 
> connection on non-2xx status code
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-626
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-626
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore
>    Affects Versions: 5.0
>            Reporter: Michael Osipov
>            Priority: Major
>             Fix For: 5.0.3, 5.1-beta2
>
>
> Based on the discussion in 
> [this|https://www.mail-archive.com/httpclient-users@hc.apache.org/msg09851.html]
>  thread. The expect handling was been changed in a way that it turns out to 
> be pointless. Roy Fielding commented that a server can close a connection on 
> a non-2xx status and the client does not need to send the request body in 
> this case.
> In the spirit of this, we shall close the connection immediately w/o sending 
> the request body. It shall only be send if the server does not request to 
> close the connection.
> The client can close the connection itself if a non-2xx status has been 
> received and it wishes not to send the request body. Otherwise one must 
> completely the request for the server connection to continue function 
> properly.
> This likely only applies when a {{Content-Length}} header has been supplied.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to