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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to