范德萨发而为
全部博文(392)
分类: Java
2013-08-09 17:51:56
A server MAY reject a request that contains a message body but not a by responding with .
Unless a transfer coding other than chunked has been applied, a client that sends a request containing a message body SHOULD use a valid header field if the message body length is known in advance, rather than the chunked transfer coding, since some existing services respond to chunked with a status code even though they understand the chunked transfer coding. This is typically because such services are implemented via a gateway that requires a content-length in advance of being called and the server is unable or unwilling to buffer the entire request before processing.
A user agent that sends a request containing a message body MUST send a valid header field if it does not know the server will handle HTTP/1.1 (or later) requests; such knowledge can be in the form of specific user configuration or by remembering the version of a prior received response.