Skip to content

Instantly share code, notes, and snippets.

@lidgnulinux
Last active April 22, 2025 00:25
Show Gist options
  • Save lidgnulinux/8b5365a870ad81caf35fc8537c614d5c to your computer and use it in GitHub Desktop.
Save lidgnulinux/8b5365a870ad81caf35fc8537c614d5c to your computer and use it in GitHub Desktop.
Kumpulan Kulak Kulik.

Kumpulan Kulak Kulik.

Linux related.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment