Ajax answer - gzip compressed - prototype, Firefox cannot handle it

I am trying to request a web service (using JavaScript, prototype). The server responds with XML, but compresses it; headers are set accordingly.

In Safari 4, everything is fine. The answer breaks up, and JavaScript can process the data.

In Firefox 3.5.8, JavaScript data is not returned!

the code:

var req = new Ajax.Request(this.url, { asynchronous: false, contentType: 'text/xml', method: 'post', postBody: xmlString, onSuccess: function(t) { // debug, place response into textarea to show $('responseText').value = t.responseText; } }); 

This is the answer as I track it online:

 HTTP/1.1 200 OK. Date: Fri, 05 Mar 2010 14:10:51 GMT. Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny6 with Suhosin-Patch. X-Powered-By: PHP/5.2.6-1+lenny6. Vary: Accept-Encoding. Content-Encoding: gzip. Content-Length: 2104. Keep-Alive: timeout=15, max=100. Connection: Keep-Alive. Content-Type: text/xml. . ............]s......W`.3...H&A.$.Q.^[.:....... (and so on ...) 

Any idea why this is happening? What can i do with this?

I tried setting the "Accept-Encoding" header in the request, I can not get it to work properly. In addition, the answer can be quite large, which means: it is good that it is compressed by the server.

+2
javascript prototypejs firefox gzip
source share

No one has answered this question yet.

See similar questions:

6
Using the new facebook api graph, ajax calls returns null (empty)
2
Firefox does not decompress gzip files

or similar:

299
jQuery $ .ajax (), $ .post sends "OPTIONS" as REQUEST_METHOD in Firefox
184
Amazon CloudFront gzipped CSS and JavaScript through S3
45
GZip compression in IIS 7.5 does not work
24
WCF GZip Request / Response Processing
22
enable gzip compression using nginx
2
IIS6 does not perform gzip compression when including Via header in request
one
gzip compression does not work with IIS 8.5
one
How to disable gzip compression for PHP AJAX request / response in Apache2?
0
gzip compression does not work in browser

All Articles