[emacs-w3m:13885] [emacs-w3m/emacs-w3m] Problem with brotli compression (Issue #112)
chipschap <[email protected]> Mon, 07 Nov 2022 12:06:37 -0800
| Newsgroups | gmane.emacs.w3m |
|---|---|
| Message-ID | <emacs-w3m/emacs-w3m/issues/[email protected]> |
----==_mimepart_6369654d7797d_4f21c67040243
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
I noticed a while ago after some updates that some web sites stopped rendering correctly and produced binary-looking buffers. I didn't resolve this. A little later another person mentioned the same thing in the emacs help mailing list. But some others don't have the problem. I tracked it down and it appears to be that emacs-w3m doesn't have a "brotli" handler for brotli web page compression, as used by slashdot, duckduckgo, and others. Strangely this only seems to affect the later versions of the w3m command; earlier versions seem okay although I can't be more specific about which versions.
I added two lines of code that for me and the other user resolve the problem. The patch requires that the "brotli" command be in the command path. I don't check for this. I didn't generate a diff but the following in w3m.el should be hopefully clear enough.
defcustom w3m-decoder-alist should add this line to the list of types
(br "brotli" ("-d"))
defconst w3m-encoding-alist should add this line to the list of types
(br . ("br"))
I hope this is of some use.
--
Reply to this email directly or view it on GitHub:
https://github.com/emacs-w3m/emacs-w3m/issues/112
You are receiving this because you are subscribed to this thread.
Message ID: <emacs-w3m/emacs-w3m/issues/[email protected]>
----==_mimepart_6369654d7797d_4f21c67040243
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<p></p>
<p dir="auto">I noticed a while ago after some updates that some web sites stopped rendering correctly and produced binary-looking buffers. I didn't resolve this. A little later another person mentioned the same thing in the emacs help mailing list. But some others don't have the problem. I tracked it down and it appears to be that emacs-w3m doesn't have a "brotli" handler for brotli web page compression, as used by slashdot, duckduckgo, and others. Strangely this only seems to affect the later versions of the w3m command; earlier versions seem okay although I can't be more specific about which versions.</p>
<p dir="auto">I added two lines of code that for me and the other user resolve the problem. The patch requires that the "brotli" command be in the command path. I don't check for this. I didn't generate a diff but the following in w3m.el should be hopefully clear enough.</p>
<p dir="auto">defcustom w3m-decoder-alist should add this line to the list of types</p>
<pre class="notranslate"><code class="notranslate">(br "brotli" ("-d"))
</code></pre>
<p dir="auto">defconst w3m-encoding-alist should add this line to the list of types</p>
<pre class="notranslate"><code class="notranslate"> (br . ("br"))
</code></pre>
<p dir="auto">I hope this is of some use.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/emacs-w3m/emacs-w3m/issues/112">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ALIUPNZ7O6PF2B3VCYKX3GLWHFOM3ANCNFSM6AAAAAARZR2FZU">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ALIUPN5GREEC6BXBMPTQRMTWHFOM3A5CNFSM6AAAAAARZR2FZWWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFLQ7Y4M.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><emacs-w3m/ema
cs-w3m/issues/112</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/emacs-w3m/emacs-w3m/issues/112",
"url": "https://github.com/emacs-w3m/emacs-w3m/issues/112",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
----==_mimepart_6369654d7797d_4f21c67040243--