-
-
Save lidgnulinux/8b5365a870ad81caf35fc8537c614d5c to your computer and use it in GitHub Desktop.
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.
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.
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