0

任何人都可以提供一些关于我将如何在经典 ASP 中解压缩 XML 响应的见解。我们已经收到了一些代码并要求让它工作:

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
    ...

显然,现在响应是使用 gzip 压缩的,我们必须先解压缩 XML 响应,然后才能开始处理数据。

我该怎么办?

4

1 回答 1

0

ServerXMLHTTP 不支持压缩。

但是,您可以尝试使用 GZip 组件:

http://www.vclcomponents.com/ASP/File_Manipulation/File_Management/GZip_Component-info.html

哎呀,没有检查问题的日期!:)

于 2011-02-15T09:03:32.520 回答