TC
2005-07-27 14:05:16 UTC
Hi
Does anyone know what you have to do with a
GET request for gzip file to un-compress automatically ?
I have a gzip xml file sitting on an iis 5 web server, & a client app
in side of a dhtml generrated asp page .. the vb script code snippet is like
this
set oXMLDoc = createobject("Microsoft.XMLDOM")
'set oXMLHttp = createobject("Microsoft.XMLHTTP")
set oXMLHttp = createobject("WinHttp.WinHttpRequest.5")
sURL = http://localhost/spool/test.xml.gz
oXMLHttp.open "GET",sURL,false ' async
oXMLhttp.setRequestHeader "Content-Type", "text/xml"
oXMLhttp.setRequestHeader "Content-Encoding", "gzip"
oXMLHttp.setRequestHeader "Accept-Encoding", "gzip, deflate"
oXMLHttp.send ""
msgbox oXMLHttp.getallresponseheaders
if ((oXMLHttp.status <> 200) or len(oXMLHttp.responseXML.xml) =0) or
err.number <> 0 then
call msgbox(oXMLHttp.status & vbcrlf & "text: " &
oXMLHttp.responseText)
exit sub
end if
oXMLDoc.loadXML oXMLHttp.responseXML.xml
I get a oXMLHttp.status =200 back but the oXMLHttp.responseText is still
compressed
I have also tried the Microsoft.XMLHTTP object with the same results
Does anyone know what you have to do with a
GET request for gzip file to un-compress automatically ?
I have a gzip xml file sitting on an iis 5 web server, & a client app
in side of a dhtml generrated asp page .. the vb script code snippet is like
this
set oXMLDoc = createobject("Microsoft.XMLDOM")
'set oXMLHttp = createobject("Microsoft.XMLHTTP")
set oXMLHttp = createobject("WinHttp.WinHttpRequest.5")
sURL = http://localhost/spool/test.xml.gz
oXMLHttp.open "GET",sURL,false ' async
oXMLhttp.setRequestHeader "Content-Type", "text/xml"
oXMLhttp.setRequestHeader "Content-Encoding", "gzip"
oXMLHttp.setRequestHeader "Accept-Encoding", "gzip, deflate"
oXMLHttp.send ""
msgbox oXMLHttp.getallresponseheaders
if ((oXMLHttp.status <> 200) or len(oXMLHttp.responseXML.xml) =0) or
err.number <> 0 then
call msgbox(oXMLHttp.status & vbcrlf & "text: " &
oXMLHttp.responseText)
exit sub
end if
oXMLDoc.loadXML oXMLHttp.responseXML.xml
I get a oXMLHttp.status =200 back but the oXMLHttp.responseText is still
compressed
I have also tried the Microsoft.XMLHTTP object with the same results