Difference between "x-gzip" and "gzip" for content-encoding
Asked Answered
L

2

15

In request header, we have accept-encoding: gzip, but got response with encoding x-gzip.

I found this note about x-gzip and gzip:

Use of program names for the identification of encoding formats is not desirable and is discouraged for future encodings. Their use here is representative of historical practice, not good design. For compatibility with previous implementations of HTTP, applications SHOULD consider "x-gzip" and "x-compress" to be equivalent to "gzip" and "compress" respectively.

Does it mean x-gzip is equal to gzip? We can simply use the same way to unzip x-gzip content as gzip content?

Latisha answered 19/2, 2014 at 3:21 Comment(0)
C
12

x-gzip and gzip are equivalent.

The content you receive can be unzipped the same way for both.

Chowder answered 19/2, 2014 at 3:43 Comment(0)
D
7

I think you should use gzip instead of x-gzip because x- means eXperimental and x-gzip remains for historical reasons.

ref: https://datatracker.ietf.org/doc/html/rfc6648#appendix-B

Debbidebbie answered 8/9, 2021 at 6:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.