What is the canonical method for an HTTP client to instruct an HTTP server to disable gzip responses?

前端 未结 3 1431
一个人的身影
一个人的身影 2020-12-16 14:13

I thought this was a simple google search, but apparently I\'m wrong on that.

I\'ve seen that you should supply:

Accept-Encoding: gzip;q=0,deflate;q=         


        
3条回答
  •  一生所求
    2020-12-16 14:32

    Do you wish encoding to be disabled altogether?
    Then skip the Accept-Encoding header itself within http request headers.

    Do you wish only gzip compression to be absent in the http response?
    Then skip gzip from the values list in the http request header.

    Do you wish to prioritize different compression techniques that servers support? then use different values between 0 and 1 along-with q argument for each value in the Accept-Encoding http request header. (Currently you are using conflicting value and indicating by weight=0 that you don't know how you'll manage, but you want response to be encoded anyhow)

提交回复
热议问题