Filip Hanik - Dev Lists wrote:
> 
> I just skimmed this through, but from what I remember, the CRLF after
> </xml> should not be counted into your "chunk header"

No, the chunk-size is the entire length of the chunk. Since a chunked
content-body can include any sort of data, it wouldn't make sense to
exclude trailing whitespace characters - the content might not be of a
type where "whitespace characters" were defined.

See RFC 2616 3.6.1:

       chunk-data     = chunk-size(OCTET)

There must be exactly as many octets as specified in chunk-size.

What I don't see in the trace are the zero-size chunks that terminate
the chunked content-bodies.

In frame 12, the client closes the connection (sends a FIN); that
would appear to be why Tomcat is reporting the client closed the
connection.

Of course this is only a half-close, and the server *could* still send
a response, but RFC 2616 doesn't acknowledge the half-close mechanism
in TCP. From 4.4:

   5.By the server closing the connection. (Closing the connection
     cannot be used to indicate the end of a request body, since that
     would leave no possibility for the server to send back a response.)

This is, depending on your viewpoint, an error, oversight, or
restriction in HTTP; but in effect it means that if the client closes
its end of the conversation after sending a request but before
receiving a response, the the server is free to consider the
connection closed (even though it isn't) and discard the request.

-- 
Michael Wojcik
Micro Focus
Rhetoric & Writing, Michigan State University


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to