You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/09/12 12:39:00 UTC

[jira] [Commented] (HTTPCORE-643) Add zero content-length to PUT and POST requests with no entity

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

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

Commit ba87dac188f01a7259f8936f4c4eefebeac94c2d in httpcomponents-core's branch refs/heads/master from Carter Kozak
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-core.git;h=ba87dac ]

HTTPCORE-643: Implement NullEntity for convenience (#209)



> Add zero content-length to PUT and POST requests with no entity
> ---------------------------------------------------------------
>
>                 Key: HTTPCORE-643
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-643
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>    Affects Versions: 5.0.1
>            Reporter: Carter Kozak
>            Priority: Major
>             Fix For: 5.1
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> [https://tools.ietf.org/html/rfc7230#section-3.3.2] states "A user agent SHOULD send a Content-Length in a request message when
>  no Transfer-Encoding is sent and the request method defines a meaning
>  for an enclosed payload body."
>  
> I encountered a proxy that rejected both PUT and POST requests with no content-length and no body by returning a 411 "Length Required" status. I believe this is rare, and servers are expected to support requests with and without a defined content length and no body, but it would be helpful to add the content-length by default to avoid incompatibility.



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

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