Dear All,

I couldn't find mention in the servlet spec for this so I'm asking here if anyone knows what the correct procedure should be.

In a servlet I want to use the HTTP 1.1 chunked transfer encoding, so, I add the Transfer-encoding header with a value of chunked as a response header.

I then start writing my servlet data to the servlet's output stream.

My question is this - is the servlet responsible for encoding the data as per the HTTP 1.1 chunking rules, or can I expect the servlet container to handle this for me.

The reason I ask is that, as far as I can tell, tomcat is ignoring the chunk directive and my data is passed to the the browser 'unchunked'.

If this is the case, and the servlet has to perform the chunking, how does this mesh with special character encodings that are meant to be performed prior to the transfer-encoding being applied?

In my serlvet, I might set my serlvet locale to, say, japanese, and have the servlet engine do the appropriate encoding for me, ie. from unicode to Shift_js, but, If my serlvet is responsible for performing the transfer-encoding, how can I do this, when the character-encoding is meant to be performed prior to the transfer-encoding.

Of course, all this is moot if the container performs the transfer-encoding for me and so can someone tell me the correct procedure for informing tomcat to use chunk-encoding.

I've tried setting the Transfer-encoding header, but I still seem to be seeing a Content-Length header as well as a Transfer-Encoding header in my response header, and all data appears to be non-chunked, i.e. there's no prefix ie. Hex size <cr><lf> associated with the data I send.

-Thom

--
"My friend, you would not tell with such high zest
To children ardent for some desperate glory,
The old Lie: Dulce et decorum est Pro patria mori." -- Wilfred Owen (1893-1918)


http://www.etsu.edu/english/muse/owen.htm

--
Borland -- Enabling a new digital world where our customers
have the freedom of choice to develop, deploy, and integrate
applications across the enterprise and  the Internet.
http://www.borland.com

This e-mail, and any attachments thereto, is intended only
for use by the addressee(s) named herein and may contain
legally privileged and/or confidential information.  If you
are not the intended recipient of this e-mail, you are hereby
notified that any dissemination, distribution or copying of
this e-mail, and any attachments thereto, is strictly prohibited.
If you have received this e-mail in error, please immediately
and permanently delete the original and any copy of any e-mail
and any printout thereof.




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to