One more question... you are checking t.responseText ... have you tried t.responseXML?

- Jeff


On Mar 5, 2010, at 8:45 AM, Hank wrote:

Hi guys,

I'm having some difficulties here. Am trying to query a webservice via
Ajax.Request. The server returns XML, but decides to gzip-compress it.
This is properly indicated in the response headers. Under Safari, the
response is properly understood and returned. Under Firefox 3.5 I'm
getting nothing... Firebug shows no response...

Here's the code (xmlString is contains the XML request to the
webservice):

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

Here's what I see when I trace the response from the server (via
ngrep):

HTTP/1.1 200 OK.
Date: Fri, 05 Mar 2010 13:38:30 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=99.
Connection: Keep-Alive.
Content-Type: text/xml.
.
............]s......W`.3...H&A.$.Q.^[.:........@.
$ .."HQ../....k..V.E..X"A..s..9....BI0g..F.{......M.4..
{Kf{..}.v......>..............{{1...h<......{.gY.
{.Zv.le.e.......M.qY}.GR0....uT.|d.v....r.q..MS.....
9........f..Z..WCj:-..=0..N...=.y..wo..............bK"..dF=h;. 8<....W..
{.1....WV....Y........&Kd.....\_t|8q..C.!.#....h|tq.yry[..?|.{?.._~.
0:..{....>.08p.O....
(... and more of this)


Any idea what the problem is? I would have thought the browser handles
all of the decompression at lower layers.

Thanks for your help!
Cheers,
Hank

--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com . To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en .


--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to