Difference between "x-gzip" and "gzip" for content-encoding

xbob.ym picture xbob.ym · Feb 19, 2014 · Viewed 11.2k times · Source

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?

Answer

user513951 picture user513951 · Feb 19, 2014

x-gzip and gzip are equivalent.

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