2011-10-05 41 views
0

我需要實現壓縮Gzip已在下面的XML請求如何使用asp代碼在我的xml請求中創建壓縮Gzip?

<% 

    pXML=Server.URLencode(XML_Request)  
set http = server.CreateObject("MSXML2.ServerXMLHTTP")  
http.open "post", "http://213.171.234.70/appservices/http/FrontendService", false 

    http.setRequestHeader "Content-Type", 
"application/x-www-form-urlencoded"  
http.send "xml_request=" &pXML 

    http_response= http.responsexml.xml 
    Set xd= Server.CreateObject("Microsoft.XMLDOM") 
    xd.async = "false" 
    xd.loadXML(http_response) 

%> 

請幫助解決這個問題.....

TKS

回答

0

您可以嘗試添加accept標頭,以便服務器發送gzip編碼的內容。

http.send之前給你的代碼添加:

http.setRequestHeader "Accept-Encoding", "compress, gzip"