You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "James Leigh (JIRA)" <ji...@apache.org> on 2010/03/04 17:37:27 UTC

[jira] Created: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

HttpRequestParser Fails to Detect Requests Without a Message Body
-----------------------------------------------------------------

                 Key: HTTPCORE-219
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
             Project: HttpComponents HttpCore
          Issue Type: Bug
          Components: HttpCore NIO
    Affects Versions: 4.0.1
            Reporter: James Leigh


The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.

As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841905#action_12841905 ] 

Oleg Kalnichevski commented on HTTPCORE-219:
--------------------------------------------

There is nothing wrong with HTTP protocol extensions as long as they are clearly defined.

Oleg

> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "James Leigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841516#action_12841516 ] 

James Leigh commented on HTTPCORE-219:
--------------------------------------

I am talking about some _arbitrary_ _non-standard_ methods, but I am referring to the _standard_ HTTP messaging (not its methods).

The problem I encountered is that if HttpEntityEnclodingRequest is used and there is no message-body (i.e. no Content-Length or Transfer-Encoding headers), the method NHttpRequestHandler#entityRequest is called, but the methods ConsumingNHttpEntity#consumeContent and NHttpRequestHandler#handle are never called because there is no message-body to read. This is unexpected behaviour (to me) and was not easily tracked down.

Since httpCore detects the message-body differently then the HTTP spec I thought I would post this bug report so that others might not encounter this problem in the future.

> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841491#action_12841491 ] 

Oleg Kalnichevski commented on HTTPCORE-219:
--------------------------------------------

...
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.
...

Oleg


> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCORE-219.
----------------------------------------

    Resolution: Invalid

I am sorry, James, but your assertion is incorrect. The decision as to whether a message is entity closing or not is taken by HttpRequestFactory, not HttpRequestParser. The default implementation of HttpRequestFactory can be replaced by a custom impl, which can make all requests entity enclosing,  if you are absolutely sure you need to bastardize the HTTP protocol.

And no, GET requests MAY NOT have a content body. Only POST and PUT messages are defined as entity enclosing by the RFC2616

Oleg

> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "James Leigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841516#action_12841516 ] 

James Leigh edited comment on HTTPCORE-219 at 3/4/10 9:02 PM:
--------------------------------------------------------------

I am talking about some _arbitrary_ _non-standard_ methods, but I am referring to the _standard_ HTTP messaging (not its methods).

The problem I encountered is that if HttpEntityEnclodingRequest is used and there is no message-body (i.e. no Content-Length or Transfer-Encoding headers), the method NHttpRequestHandler#entityRequest is called, but the methods ConsumingNHttpEntity#consumeContent and NHttpRequestHandler#handle are never called because there is no message-body to read. This is unexpected behaviour (to me) and was not easily tracked down.

Since httpCore detects the message-body differently then the HTTP spec I thought I would post this bug report so that others might not encounter this problem in the future.

The solution I did implement is to override
DefaultServerIOEventDispatch, DefaultNHttpServerConnection,  and HttpRequestParser to replace the HttpEntityEnclosingRequest object if there is no message-body.

      was (Author: jleigh):
    I am talking about some _arbitrary_ _non-standard_ methods, but I am referring to the _standard_ HTTP messaging (not its methods).

The problem I encountered is that if HttpEntityEnclodingRequest is used and there is no message-body (i.e. no Content-Length or Transfer-Encoding headers), the method NHttpRequestHandler#entityRequest is called, but the methods ConsumingNHttpEntity#consumeContent and NHttpRequestHandler#handle are never called because there is no message-body to read. This is unexpected behaviour (to me) and was not easily tracked down.

Since httpCore detects the message-body differently then the HTTP spec I thought I would post this bug report so that others might not encounter this problem in the future.
  
> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841507#action_12841507 ] 

Oleg Kalnichevski commented on HTTPCORE-219:
--------------------------------------------

James, if you are talking about some _arbitrary_ _non-standard_ methods what is the point of referring to the section of the specification that refers to the _standard_ HTTP methods?

If the transport you are developing needs to support arbitrary non-standard methods, just make those methods implement HttpEntityEnclodingRequest interface and then let HttpCore generate an entity for those methods based on content of Content-Length or Transfer-Encoding headers or leave it null if those headers are not present. If you do not like this kind of approach, just implement a custom message parser as described here [1] and do whatever your heart desires.

Oleg

[1 ]http://hc.apache.org/httpcomponents-core/tutorial/html/advanced.html#d0e2470 

> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841473#action_12841473 ] 

Oleg Kalnichevski commented on HTTPCORE-219:
--------------------------------------------

I do not understand. If you have an extended HTTP method that is known to allow for an entity to be enclosed in it, why do not you simply make it implement HttpEntityEnclodingRequest? The ability of an HTTP request to enclose a request entity is not defined by any headers. It is defined by the type of the method. Headers such as Content-Length or Transfer-Encoding determine how exactly the entity is delimited. That is it.

Oleg

> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "James Leigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841483#action_12841483 ] 

James Leigh commented on HTTPCORE-219:
--------------------------------------

All HTTP methods may not be known at compile time and the HTTP method could allow an optional message-body.

>From RFC2616 section 4.3 Message Body:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.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. A server SHOULD read and forward a message-body on any request; if the request method does not include defined semantics for an entity-body, then the message-body SHOULD be ignored when handling the request.


> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "James Leigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841878#action_12841878 ] 

James Leigh commented on HTTPCORE-219:
--------------------------------------

I'm not building a protocol, I'm building a platform on which protocols can be implemented. The protocol implementations will not be written in Java. They will be read from an external source at runtime, so I need more runtime flexibility in the HTTP methods the server can process.

> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "James Leigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841497#action_12841497 ] 

James Leigh commented on HTTPCORE-219:
--------------------------------------

The issue I want to raise is not about methods that do not allow sending an entity-body, but rather methods that are either not known or permit an optional message body. In these cases 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". However, the HttpRequestFactory is not provided with these header when the HttpRequest object is created preventing httpCore from being reasonable used in theses cases.

> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "Sam Berlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841899#action_12841899 ] 

Sam Berlin commented on HTTPCORE-219:
-------------------------------------

I don't think it's all that terribly bizarre.  The HTTP format (send a request with headers & an optional body, get a response with optional headers & a body) is pretty well-defined, and it's not that much of a stretch to imagine extensions to it that utilize the underpinnings but change the methods & interpretations.

> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "James Leigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841466#action_12841466 ] 

James Leigh commented on HTTPCORE-219:
--------------------------------------

HttpRequestFactory does not have access to the HTTP headers and cannot determine if the request has a message body.

I guess my concern is not with GET/POST/PUT, but HTTP methods not defined in HTTP 1.1, such as the method defined in WebDAV.

> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "Ortwin Glück (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841750#action_12841750 ] 

Ortwin Glück commented on HTTPCORE-219:
---------------------------------------

> All HTTP methods may not be known at compile time and the HTTP method could allow an optional message-body. 

Excuse me? What kind of protocol is that, which is not well-defined at compile time? Sounds like a purely theoretical problem to me.

> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCORE-219) HttpRequestParser Fails to Detect Requests Without a Message Body

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841886#action_12841886 ] 

Oleg Kalnichevski commented on HTTPCORE-219:
--------------------------------------------

So, you are building a platform for implementing custom protocols on top of HTTP? How bizarre.

Oleg 

> HttpRequestParser Fails to Detect Requests Without a Message Body
> -----------------------------------------------------------------
>
>                 Key: HTTPCORE-219
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-219
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0.1
>            Reporter: James Leigh
>
> The HttpRequestParser uses the request method to determine if the request has a message body. However, HTTP 1.1 states that 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 header fields. The parser should be changed to use the header to determine if a message body is present.
> As is a POST or PUT request is received without a message body cannot be processed. Furthermore, a GET request with a message body cannot be processed either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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