-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

On 3/10/2011 12:37 PM, Chris wrote:
>  As I mentioned below, the "0\r\n\r\n" was not being sent to nginx, although 
> it was being sent to curl. The difference was that nginx was doing a GET 
> HTTP/1.0, while curl was using HTTP/1.1. If I configure curl to use HTTP/1.0 
> then I get the same result: no "0\r\n\r\n" is sent.
> 
> So, to summarize:
> - GET HTTP/1.0 results in no terminating "0\r\n\r\n" for the chunked 
> response, regardless of whether libtcnative is being used.
> - The difference when using libtcnative is that the connection isn't 
> terminated after the response is sent.

Good catch with the HTTP 1.0 versus 1.1.

I'm not exactly an expert at HTTP spec and compliance, but I'm pretty
sure that the following are true:

1. HTTP 1.0 does not support chunked encoding, therefore Tomcat is
   somewhat correct in it's failure to send a trailing 0\r\n\r\n.
   Does Tomcat send a "chunked" response header?

2. Calling response.flush() often triggers the use of chunked encoding,
   which could cause Tomcat to make a poor decision when HTTP 1.0 is
   involved.

Is it possible to configure nginx to use HTTP 1.1? I would think you'd
want to use 1.1 anyway.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk16M0sACgkQ9CaO5/Lv0PCD6wCfVT45mNh6JCwP/xYAOCxPY+7M
AxkAoLnagKz9MyDx1Sre97kVF+o1w0yI
=J90v
-----END PGP SIGNATURE-----

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

Reply via email to