Thank you very much for the comments. But I'm still not sure why I have problems reading the Accept-Encoding header on the server.
My problem is when I recieve the request on the server (And I know by using a proxy that the request contains an Accept-Encoding header). At the server I cannot read the accept-encoding header, instead I get a header consisting of dashes. It doesn't matter if I try to read the headers of the request in a filter or servlet/jsp - I have the same problem. When I generate the html response to the client I use this in the head tag of the html page: <meta content="text/html; charset=UTF-8" http-equiv="content-type" /> But I cannot see why this should have anything to do with reading headers from the request. I'm really stuck in this weird problem regards, and thanks again. Christian On 4/13/07, Rashmi Rubdi <[EMAIL PROTECTED]> wrote:
> The problem arose when I was writing a special compression filter I tried your code in a JSP directly (without using any other custom compression filter) and it prints as follows: Accept-Encoding gzip,deflate some other headers...... accept text/xml,application/xml,application/xhtml+xml,text/html;q= 0.9,text/plain;q=0.8 ,image/png,*/*;q=0.5 accept-language en-us,en;q=0.5 accept-encoding gzip,deflate accept-charset UTF-8,* some more headers.......... The description of Accept-Encoding may give you additional clues as to why you're getting dashes instead (when you use a custom compression): http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html -Rashmi On 4/13/07, Christian Hvitved <[EMAIL PROTECTED]> wrote: > 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)); > > } > --------------------------------------------------------------------- To start a new topic, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]