I think what was suggested before is to control this behavior by setting 
"keepAlive" setting. I would not think this is the right way.

I would still want to preserve "keepAlive" functiojnality for all other 
requests except "long running comet response". So if it is request for a web 
page, using keepAlive is fine.
Now in order to disable chunked encoding for a particular response, I would 
propose that a developer would set "Connection:close" header. Using connection 
"close" implies that closing the connection indicates the end of response and 
chunked encoding is not necessary in this case.

> Date: Thu, 6 Jan 2011 12:12:37 -0500
> From: ch...@christopherschultz.net
> To: users@tomcat.apache.org
> Subject: Re: How to disable chunked encoding for the Http11NioProtocol 
> connector.
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ilya,
> 
> On 1/5/2011 4:29 PM, ilya goberman wrote:
> > I was thinking more about it. What if Tomcat disables chunked
> > encoding if response contains "Connection: close" header.
> 
> I think that's what Mark has suggested several times, now:
> 
> On 1/5/2011 12:54 PM, Mark Thomas wrote:
> > As I said, an enhancement request to optionally use a non-chunked 
> > response when keep-alive is disabled is - in my view - a reasonable
> > one.
> 
> On 1/5/2011 4:29 PM, ilya goberman wrote:
> > So in order
> > to disable the encoding the Tomcat application will have to set just
> > one response header.
> 
> ... and set a configuration parameter in Tomcat to enable this feature.
> Apparently, the feature as you describe it was a problem fixed in a
> previous version of Tomcat and won't be reverted unless a serious
> regression is identified. Mark is offering to allow configuration to
> re-enable this behavior.
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk0l+AUACgkQ9CaO5/Lv0PAFbwCeNzfxtyfbDFvvzdKekcVCkSTC
> FQ0AoI4kc2YFrKta7Q+TFL8Cap68fc3z
> =j0Ua
> -----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