Subject: Re: bug#73133: 29.2; EWW fails to render some webpages

From: Jim Porter <[email-masked]>
Date: Thu, 3 Oct 2024 16:39:06 -0700

On 9/30/2024 10:10 AM, Sebastián Monía wrote:
> We aren't really guessing the content-type, at least in the scope of my
> original patch, and probably this bug. We just want to know if the page
> is HTML to render it, in these snippets (part of eww-render):

What I was thinking about was something like this (with some appropriate 
implementation for 'eww--guess-content-type', possibly accepting args as 
needed):

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index b5d2f20781a..1c134717cc9 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -659,7 +659,7 @@ eww-render
  	 (content-type
  	  (mail-header-parse-content-type
             (if (zerop (length (cdr (assoc "content-type" headers))))
-	       "text/plain"
+	       (eww--guess-content-type)
               (cdr (assoc "content-type" headers)))))
  	 (charset (intern
  		   (downcase