0

I need to implement Compression Gzip in the below xml request

 <%

    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)

 %>

Please help to fix this.....

tks

svick
  • 236,525
  • 50
  • 385
  • 514
user475464
  • 1,741
  • 10
  • 26
  • 38

2 Answers2

0

I believe you cannot, HTTP protocol doesn't allow it. Please look here for more detailed explanation. Why can't browser send gzip request?

Community
  • 1
  • 1
kan
  • 28,279
  • 7
  • 71
  • 101
0

You can try to add the accept header, so the server will send gzip encoded content.

Add this to your code before http.send:

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

gpinkas
  • 2,291
  • 2
  • 33
  • 49