• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

allowChunking in Tomcat 5.x

 
Kartik Ruppa
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can "allowChunking" be used as an attribute in Tomcat 5.x ?If not,how to disable chunking in tomcat 5.0 and up?

TIA!
Kartik
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to disable chunking?
Are you using something other than a browser to access your app?
 
Kartik Ruppa
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ben,
I am not sure what exactly this parameter can do.But this is based on the article here

http://cafe.bevocal.com/docs/faq/faq.html

Iam usign a voice browser to fetch the docs from tomcat and see bad fetches being thrown.

Based on the above link I mentioned,it looks like bad fetches can be reduced by disabling chunking.

If you have any insight into this,do let me know.

Thanks,
Kartik
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A while back, I was working with a soap client that couldn't handle chunked responses. I was able to get Tomcat to send unchunked data by changing the HTTP version in the request to HTTP/1.0 (HTTP/1.1 is the default for most browsers these days).
This was done from the client itself, not from within Tomcat.



From: http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

HTTP/1.1 and HTTP/1.0 Support

This Connector supports all of the required features of the HTTP/1.1 protocol, as described in RFC 2616, including persistent connections, pipelining, expectations and chunked encoding. If the client (typically a browser) supports only HTTP/1.0, the Connector will gracefully fall back to supporting this protocol as well. No special configuration is required to enable this support. The Connector also supports HTTP/1.0 keep-alive.

RFC 2616 requires that HTTP servers always begin their responses with the highest HTTP version that they claim to support. Therefore, this Connector will always return HTTP/1.1 at the beginning of its responses.


[ October 17, 2006: Message edited by: Ben Souther ]
 
Keith Furnell
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In response to the original question, I have allowChunking set to false in Tomcat 5.5 and am still seeing chunked transfers.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"allowChunking" isn't mentioned anywhere in the Tomcat 5x documentation.

Looking through the API, I can see that there was was a setAllowChunking and a getAllowChunking method in Tomcat 4.1 but both were deprecated.
http://tomcat.apache.org/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/connector/http/HttpConnector.html#setAllowChunking(boolean)

Searching the 5.5 documentation for these methods yields nothing.
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/

As I mentioned earlier, the only way I could get Tomcat to send non-chunked data was to make sure the request requests specified HTTP/1.0.
 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben Souther wrote:A while back, I was working with a soap client that couldn't handle chunked responses. I was able to get Tomcat to send unchunked data by changing the HTTP version in the request to HTTP/1.0 (HTTP/1.1 is the default for most browsers these days).
This was done from the client itself, not from within Tomcat.


Ben, I know this is a really old thread, but can you shed some light on how to set the request's HTTP version to HTTP/1.0 ? A code snippet would be great if you have one.

Thanks,
James
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic