How to fix "gzip: stdin: not in gzip format" error on w3m.

01.Fix-gzip-w3m

How to fix “gzip: stdin: not in gzip format” error on w3m

For a couple of days I faced an error when using w3m to browse some sites (e.g gist.github.com). The error seems to be related to gzip, at least that’s what I guess, because I got this error :

gzip: stdin: not in gzip format

Turns out, it’s not gzip’s fault. After I consulted to grok, I found some answers.


Why did that happen ?

Grok explain,

The “gzip: stdin: not in gzip format” error when using the w3m browser to access https://gist.github.com typically indicates that w3m is receiving data it expects to be compressed in gzip format, but the data is either not compressed or in a different format.

I just known that maybe w3m force gzip decompression or send an Accept-Encoding: gzip header, even when the server doesn’t provide compressed data.


How to solve it ?

Turns out, the solution is pretty simple. We just need to add a single line of configuration to w3m config (usually at ~/.w3m/config).

Add this line to our w3m configuration :

accept_encoding identity

Or as alternative, we can run w3m with an option called accept_encoding and pass identity as its value.

w3m -o accept_encoding=identity URL

Comments

Popular posts from this blog

Build Package with Qi.

Build gettext and libintl.so on musl.