Sending compressed data in PUT/POST requestRSS

3 replies

Last post Sep 04, 2014 12:11 PM by Veera Sangolli

  • Sending compressed data in PUT/POST request

    Mar 28, 2008 08:25 AM|SasikumarG|LINK

    Hi,We are facing problem with injecting compressed (gzip) mail items. We are trying with Exchange 2003.

    We configured our mail server’s IIS to support compression of .EML files. http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/502ef631-3695-4616-b268-cbe7cf1351ce.mspx?mfr=true .

    And our extraction works fine with extracting mail items in compressed form.

    We are using “Accept-Encoding” header with value “gzip, deflate” along with “GET” method.

    But when we try to inject the compressed stream to a mailbox using “PUT” method, we are getting blank mail item. Actual mail is not getting injected.We tried with following approaches along with PUT method:
    1. “Accept-Encoding” header with value “gzip, deflate”.
    2. “Content-Encoding” header with value “gzip”.
    3. Setting the AutomaticDecompression property of HttpWebRequest to DecompressionMethods.Gzip.
    4. Setting the Content-Type of the HttpWebRequest to “message/rfc822”, “application/x-compressed”, “application/x-zip-compressed”, “application/x-gzip-compressed” and “application/octet-stream”.
     Are we missing something else? Please help us!!!

    performance

  • Re: Sending compressed data in PUT/POST request

    Apr 30, 2008 12:51 AM|ksingla|LINK

    SasikumarG,
    IIS compression module doesn't support accepting compressed request body and decompressing. It only supports sending compressed responses. So what you are trying to do is not supported out of the box. I am not sure if there are any third party solutions which can do this.
    Thanks,
    Kanwal

  • Re: Sending compressed data in PUT/POST request

    Apr 30, 2008 01:06 AM|SasikumarG|LINK

    Thanks Kanwal!

  • Re: Sending compressed data in PUT/POST request

    Sep 04, 2014 12:11 PM|Veera Sangolli|LINK

    Hi, I am also facing same issue in IIS 7. I need to send the compressed file (using gZip) to the asmx service, which would recieve the compressed file and save it on the specified location. I have hosted asmx/wcf service on the IIS. But, the service is not receiving the file.

    In the request: Content-Type: application/x-gzip; Accept-Encoding: gzip, deflate; Fiddler-Encoding: base64 

    I get an error like:

    HTTP/1.1 415 Unsupported Media Type

    Content-Type: text/html.

    Content Type application/x-gzip was not supported by service.

    {"The remote server returned an error: (415) Unsupported Media Type."}

    performance IISapplicationxgzipAcceptEncodinggzipdeflate