[
https://issues.apache.org/jira/browse/HTTPCLIENT-1124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13099615#comment-13099615
]
Alexey Levan commented on HTTPCLIENT-1124:
------------------------------------------
OK, let's take a closer look on the RFC:
Section 4.3:
The presence of a message-body in a request is signaled by the inclusion of
a Content-Length or Transfer-Encoding header field in the request's
message-headers. A message-body MUST NOT be included in a request if the
specification of the request method (section 5.1.1) does not allow sending an
entity-body in requests.
That's the only restriction on the message body inclusion in requests I could
find. So, which methods do not allow sending an entity-body in requests?
Looking from method definitions in the section 9... there're no such methods.
All methods allow sending a message body. Even OPTIONS, which has no defined
server behaviour associated with body.
The rest of the section 9 looks pretty much irrelevant. Did I miss something?
> Can't send request body with HTTP methods other than POST and PUT
> -----------------------------------------------------------------
>
> Key: HTTPCLIENT-1124
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1124
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.1.2
> Reporter: Alexey Levan
> Priority: Minor
>
> I'd like to have a possibility to send an HttpEntity regardless of method of
> request. The HTTP spec doesn't prohibit that (AFAIK, even GET requests with
> body are allowed), and any spec-compliant implementation shouldn't do it
> either. I suggest merging HttpEntityEnclosingRequestBase with
> HttpRequestBase, since there's really no reason to make this artifical
> restriction.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]