Hi

Yes, there could be a bug in the HTTP Proxy Server, for example the bug just reported :
"43625 : system.xml.xmlexception: there is no Unicode byte order".
It sounds like the HTTP Proxy have some trouble decoding some pages, something similar was also reported last week.

A bug report with details on how to reproduce would be great, it would help us to solve the problem quicker.
Can you cwang create such a bug report, please ?

Regards
Alf


sebb wrote:
Just tried using IE7 to access GMail, and JMeter works fine for me
without needing to eliminate the gzip header.

Perhaps there are other types of gzipped content that are not handled so well.

S.
On 16/10/2007, cwang <[EMAIL PROTECTED]> wrote:
I have already changed the code so that it leaves the "Content-encoding:
gzip" in.
If "Content-encoding: gzip" is removed IE7 will display a page cannot be
displayed error.  After I made the change the page shows up as it should and
with the source.



Alf Høgemark wrote:
Hi

The http proxy server is unzipping the content it gets from the web
server, and then passing it on to IE uncompressed, so it has to remove
the "Content-encoding: gzip" header.
So if you are having a problem, I do not think that the removal of that
header is the problem.

When you are running the test plan made with the proxy, do you get the
expected results from the web server then ?

Do you see anything in IE7 if you do a "view source", when you are using
the proxy ?

Regards
Alf

cwang wrote:
oh sorry I miss understood your question.

The full list of headers

HTTP/1.1 200 OK
Date: Mon, 15 Oct 2007 15:32:06 GMT
Server: WebSphere Application Server/6.1
Keep-Alive: timeout=300, max=70
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Content-Language: en-US

it actually just takes out "Content-Encoding: gzip"



sebb-2 wrote:

On 13/10/2007, cwang <[EMAIL PROTECTED]> wrote:

What response header do you get?

What actual response header do you get from the application?


when I said "original headers" i mean the headers past into
massageResponseHeaders(SampleResult res, String headers),so pretty much
by
passed that method.


I think that's because the JMeter Proxy uses a sampler to get the
response, and the sampler will already have unzipped the data.

That makes sense but then why would removing the "Content-Encoding:
gzip"
header cause IE7 to not display the page?

If it just removes "gzip" from the header, that might leave something
invalid, which is why I asked what the actual header was.


I understand adding "Accept-Encoding: gzip, deflate" will probably
cause
havoc on trying to proxy pages without that, but on the application we
are
testing every page has that so it should be ok.  Do you have any idea
what
other problems these changes will cause?  I would like to look into
them
before we start full scale testing.

No idea, but I presume the code is there for a reason.


sebb-2 wrote:

On 12/10/2007, cwang <[EMAIL PROTECTED]> wrote:

when my browser sent a header with "Accept-Encoding: gzip, deflate"
it
doesn't seem to be picked up by jmeter.  It was kind of weird cause
it
wasn't even in the input stream.

then when I get the response there was a piece of code in Jmeter that
removed "Content-Encoding: gzip"
in proxy.java

       /**
        * In the event the content was gzipped and unpacked, the
content-encoding
        * header must be removed and the content-length header should

be

corrected.
        *
        * @param res
        * @param headers
        * @return
        */
       private String massageResponseHeaders(SampleResult res, String
headers) {
               int encodingHeaderLoc = headers.indexOf(": gzip"); //
$NON-NLS-1$
               String newHeaders = headers;
               if (encodingHeaderLoc > -1) {
                       int end = headers.indexOf(NEW_LINE,
encodingHeaderLoc);
                       int begin = headers.lastIndexOf(NEW_LINE,
encodingHeaderLoc);
                       newHeaders = newHeaders.substring(0, begin) +
newHeaders.substring(end);
                       int lengthIndex = newHeaders.indexOf("ength:

");

// $NON-NLS-1$
                       end = newHeaders.indexOf(NEW_LINE,

lengthIndex);

                       newHeaders = newHeaders.substring(0,

lengthIndex +

7) +
res.getResponseData().length
                                       + newHeaders.substring(end);
               }
               return newHeaders;
       }

I don't know why this piece of code was added but it cause my
browser,
Internet Explorer 7, to return with a page cannot be displayed error.

I think that's because the JMeter Proxy uses a sampler to get the
response, and the sampler will already have unzipped the data.


by hard coding "Accept-Encoding: gzip, deflate" into all my request
header
and returning the original "headers" from massageResponseHeaders it

seems

to
work for my case.

What response header do you get?


I was wondering if these changes would cause error or corrupt data in
other
areas of JMeter.

Probably.


Thanks
--
View this message in context:


http://www.nabble.com/a-few-problems-I-encountered-gzip-and-header-tf4614182.html#a13177025

Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
View this message in context:
http://www.nabble.com/a-few-problems-I-encountered-gzip-and-header-tf4614182.html#a13185274
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
View this message in context: 
http://www.nabble.com/a-few-problems-I-encountered-gzip-and-header-tf4614182.html#a13235710
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to