views:

122

answers:

0

Can anyone provide some insight into how i'd go about decompressing an XML response in classic ASP. We've been handed some code and asked to get it working:

Set oXMLHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
URL = HttpServer + re_domain + ".do;jsessionid=" + ue_session + "?" + data
oXMLHttp.setTimeouts 5000, 60000, 1200000, 1200000
oXMLHttp.open "GET", URL, false
oXMLHttp.setRequestHeader "Accept-Encoding", "gzip"
oXMLHttp.send()

if oXMLHttp.status = 200 Then 
    if oXMLHttp.responseText = "" then
        htmlrequest_get = "Empty Response from Server" 
    else
        htmlrequest_get = oXMLHttp.responseText
    end if
else
    ...

Apparently now that the response is compressed using gzip, we have to un-compress the XML response before we can start to work with the data.

How should i go about this?