tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stoddard <b...@wstoddard.com>
Subject Re: TCK Issue with Tomcat 5.5.12
Date Thu, 22 Dec 2005 20:08:00 GMT
Remy Maucherat wrote:
> Bill Barker wrote:
> 
>>> AFAICT, this code is assuming that there will always be a message  
>>> body in the POST Request. However, this is not necessarily the case  
>>> (and is certainly not true for the problem at hand). Eventually, 
>>> SocketInputStream.read() is called from within 
>>> o.a.coyote.http11.InternalReadBuffer.fill(). This call will throw a 
>>> SocketTimeoutException.
>>>
>>
>>
>> Then the test is broken.  It should either have a 'Content-Length: 0' 
>> header or a 'Transfer-Encoding: chunked' header with a '0' content 
>> delimater.  

Nope, that's incorrect.
 From RFC2616, the official HTTP standard definition:

    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 bodyless POST request w/o a TE or CL header field is permitted by RFC2616. Of course, if
the POST really 
does have a body, then bad things are guaranteed to happen.

> 
> Or it could close the input of the socket (note: nobody should be crazy 
> enough to use this method, though, as I suppose it won't work in many 
> cases). 

Nope, that technique won't work. The server can close the connection to signal the client
that it's done 
sending a response body, but the client cannot use the same technique to signal the server
that it has 
completed sending a request body.

Hope this helps.

Bill


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


Mime
View raw message