httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy T. Fielding <field...@gbiv.com>
Subject Re: POST without Content-Length
Date Sat, 07 Aug 2004 22:07:24 GMT
> What would happen in this case httpd would infer a body while no body 
> would be
> found there?
>  * In the case of a 'connection close' nothing, empty body would be 
> found.
>  * In the case of a 'persistent connection':
>    * RFC2616 section 8.1.2.1:
>        In order to remain persistent, all messages on the connection 
> MUST
>        have a self-defined message length (i.e., one not defined by 
> closure
>        of the connection), as described in section 4.4.
>      Therefore 'persistent connection' is not allowed in this case.
>
> Therefore it should be safe to assume if no Content-Length and no 
> "chunked"
> headers are present there MUST follow an optional body with the
> connection-close afterwards as 'persistent connection' MUST NOT be 
> present.

No, because looking for body when no body is present is an expensive
operation.  An HTTP request with no content-length and no 
tranfer-encoding
has no body, period:

    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.

....Roy


Mime
View raw message