hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCORE-296) IdentityDecoder fails to consume as POST request with Content-Length 0 (zero)
Date Mon, 12 Mar 2012 21:50:39 GMT

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

Oleg Kalnichevski commented on HTTPCORE-296:

The way I interpret the spec an entity enclosing request MAY have no content body but it MUST
make it clear by including 'Content-Lenght: 0' header. I still think sending back status 400
in such a case is the right thing to do. One can still (quite) easily override the default
behavior by using a custom ContentLengthStrategy implementation.

> IdentityDecoder fails to consume as POST request with Content-Length 0 (zero)
> -----------------------------------------------------------------------------
>                 Key: HTTPCORE-296
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-296
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.2-alpha2
>            Reporter: Roland Hänel
>             Fix For: 4.2-beta2
> If a client submits a POST with Content-Length 0, the HttpCore framework will fire the
onContentReceived(...) method of the HttpAsyncRequestConsumer once. However, the decoder (passed
as an argument to onContentReceived()) will never enter the "completed" state, because no
bytes will actually be received from the client. However, reaching the "completed" stage of
the decoder is an requirement for the HttpAsyncServiceHandler to finally process the request
(i.e., call the handle(...) method).
> This leads to the (incorrect) behavior that it is impossible to handle a POST request
with Content-Length 0 in HttpCore NIO.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


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

View raw message