Good Morning Kristian-

if by weird you mean "you dont understand"  then take a look at
http://www.xml.com/pub/a/2005/06/22/sparklines.html?page=last
According to this link a response of dashes is interpreted as "0 bytes returned"

A few basic questions:
Is the server xmitting using HTTP 1.0? In other words are you running tomcat 3.x? If so can you transmit a default value in other words transmit something other than 0 bytes?

Transmit via HTTP POST (instead of GET to ensure you are not causing an length overrun scenario with HTTP GET)
Enable HTTPMonitor and trace every response
What is the Content-Type for this response?
What is the Content-Length for this reponse?

I found this link quite instructive
http://www.samspublishing.com/articles/article.asp?p=31443&seqNum=6&rl=1

HTH
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- From: "Christian Hvitved" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Saturday, April 14, 2007 3:13 AM
Subject: Re: Problem reading the Accept-Encoding header from a request


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]





---------------------------------------------------------------------
To start a new topic, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to