Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 734
xbob.ym Avatar asked Feb 19 '14 03:02

xbob.ym


People also ask

What is content Encoding gzip?

Gzip is a file format and software application used on Unix and Unix-like systems to compress HTTP content before it's served to a client.

Where do I put content Encoding gzip?

The “content-encoding: gzip” HTTP Response Header You can open up Chrome DevTools or Firefox Developer Tools and look for this response header under the Network section.

What is gzip and DEFLATE Encoding?

The browser sends a header telling the server it accepts compressed content (gzip and deflate are two compression schemes): Accept-Encoding: gzip, deflate. The server sends a response if the content is actually compressed: Content-Encoding: gzip.

How do I disable gzip content Encoding?

When gzip is enabled you will see 'Content-Encoding: gzip' in the output: Note: If the website has a www redirection, change the website name to www.example.com. Connect to a server via SSH. To disable gzip compression, open the corresponding file in a text editor and change gzip on to gzip off .


1 Answers

x-gzip and gzip are equivalent.

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

like image 160
user513951 Avatar answered Oct 12 '22 00:10

user513951