Sending gzipped data in WebRequest?

后端 未结 5 610
暖寄归人
暖寄归人 2020-12-09 17:17

I have a large amount of data (~100k) that my C# app is sending to my Apache server with mod_gzip installed. I\'m attempting to gzip the data first using System.IO.Compressi

5条回答
  •  春和景丽
    2020-12-09 17:56

    Regarding your question whether Content-Encoding is applicable to client-supplied headers - according to HTTP/1.1 standard, it is:

    (from section 7)

    Request and Response messages MAY transfer an entity if not otherwise restricted by the request method or response status code.

    (from section 7.1)

       entity-header  = Allow                    ; Section 14.7
                      | Content-Encoding         ; Section 14.11
                      | Content-Language         ; Section 14.12
                      | Content-Length           ; Section 14.13
                      | Content-Location         ; Section 14.14
                      | Content-MD5              ; Section 14.15
                      | Content-Range            ; Section 14.16
                      | Content-Type             ; Section 14.17
                      | Expires                  ; Section 14.21
                      | Last-Modified            ; Section 14.29
                      | extension-header
    

提交回复
热议问题