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
  • 225,720
  • 49
  • 378
  • 501
user475464
  • 1,655
  • 10
  • 26
  • 37

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
  • 27,155
  • 7
  • 67
  • 99
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,161
  • 2
  • 28
  • 45