【问题标题】:How to decompress/inflate an XML response from ASP如何从 ASP 解压缩/膨胀 XML 响应
【发布时间】:2011-02-05 02:56:36
【问题描述】:

谁能提供一些关于我将如何在经典 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 响应,然后才能开始处理数据。

我该怎么办?

【问题讨论】:

    标签: asp-classic gzip http-compression serverxmlhttp


    【解决方案1】:

    ServerXMLHTTP 不支持压缩。

    不过,您可以尝试使用 GZip 组件:

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

    糟糕,没有检查问题的日期! :)

    【讨论】:

      猜你喜欢
      • 2017-12-12
      • 2011-06-19
      • 2014-07-25
      • 1970-01-01
      • 2014-03-23
      • 2018-01-21
      • 2019-02-12
      • 2013-12-29
      • 1970-01-01
      相关资源
      最近更新 更多