You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Donie Kelly <do...@tecnomen.ie> on 2001/10/16 14:48:36 UTC

@@ RE: When does tomcat 4.0 use a chunked response

Anybody know the answer to this?
Thanks
Donie

 -----Original Message-----
From: 	Donie Kelly [mailto:donie.kelly@tecnomen.ie] 
Sent:	15 October 2001 14:01
To:	'tomcat-user@jakarta.apache.org'
Subject:	When does tomcat 4.0 use a chunked response


Hi all

I was wondering when does tomcat decide to use a chunked response. I have a
servlet which creates a response in a string and outputs it in one go. The
response however, is coming back to our client in chunked format. 

Example:

String response="<?xml version=\"1.0\"?> <!DOCTYPE pap PUBLIC \"-
//WAPFORUM//DTD PAP 1.0//EN\"" +
		"http://www.wapforum.org/DTD/PAP1.0.dtd?>\r\n" +
		"<pap>\r\n" +
		"<push-response push-id=\"none\">\r\n" +
		"<response-result code=\"1001\"></response-result>\r\n" +
		"</push-response>\r\n" +
		"</pap>\r\n";

out.println(response);

This generates a chunked response. If I add the following line it outputs it
as normal...

res.setContentLength(response.length());

Any ideas why it decides to use chunked in the first example?
Thanks
Donie