Hi support list I am having a problem, with reading the Accept-Encoding header from a request, which seems very simple.
I use Tomcat 6.0.10 on a dansih windows xp. The problem arose when I was writing a special compression filter (I don't want to use the one that ships with tomcat). When the server recieves a http request containing an Accept-Encoding header, the header is replaced with a header with the name --------------- and value ----. The header name and value are just dashes. I have tested this by creating a filter that prints out all the headers. The code is shown at the end of the mail. The code prints out all the headers sent in the request. Except if the Accept-Encoding header is present it is replaced with dashes. When I make a request without the Accept-Encoding header I don't see the header just containing dashes. I have even tried using another server (Trifork T4) It does the same to the accept encoding header. Searching for the answer I found a post on the same problem but without a solution :( http://mail-archives.apache.org/mod_mbox/tomcat-users/200407.mbox/[EMAIL PROTECTED] Please help me out if you have any ideas why this is happening. regards Christian Hvitved The code in my filter looks like this: HttpServletRequest req = (HttpServletRequest)request; String headerValue = req.getHeader("Accept-Encoding"); System.out.println("encoding: " + headerValue); Enumeration e = req.getHeaderNames(); System.out.println("new request............"); while (e.hasMoreElements()) { String header = (String) e.nextElement(); System.out.println(header); System.out.println("Value: " + req.getHeader (header)); }