tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Adding Transfer Encoding header if not present
Date Wed, 15 Sep 2010 23:15:01 GMT
Mark Thomas wrote:
> On 15/09/2010 20:39, Amit Puri wrote:
>> Hi All
>> I am using tomcat 6.0.26
>> I've got a simple web application deployed where I am printing all header
>> information through servlet. By default I am not able to see
>> Transfer-Encoding header when I do request.getHeader
>> Enumeration enm = request.getHeaderNames();
>> while (enm.hasMoreElements()) {
>> String headerName = (String) enm.nextElement();
>> String headerValue = request.getHeader(headerName);
>> out.println(headerName);
>> out.println(headerValue);
>> }
>> Could anybody please guide me how to get header information related to
>> Transfer Encoding? What are the ways we can add this header info if it is
>> not present by default?
> You can't. Transfer encoding is a per-link header so there is no
> guarantee anything you set on Tomcat will ever be seen by a client.
> I'd add that the TE headerer is not mandatory and any client that thinks
> otherwise is badly broken.

Did I totally misread the above, or is the OP talking about request headers, as received 
by the server from a client request ?
In that case, I would think that if the servlet does not see a Transfer-Encoding header, 
it is because the client request does not contain one.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message