From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#73133: 29.2; EWW fails to render some webpages Date: Thu, 3 Oct 2024 16:39:06 -0700 Message-ID: <5e49a521-a191-15db-6368-6ca0f046d68a@gmail.com> References: <86plox4bef.fsf@gnu.org> <7eb7b048-06ea-5751-56e1-590689c8c318@gmail.com> <8e285069-6e95-de49-dd46-92ce49b94372@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="317"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 73133@debbugs.gnu.org, ganimard@tuta.io To: =?UTF-8?Q?Sebasti=C3=A1n_?= =?UTF-8?Q?Mon=C3=ADa?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 04 01:41:13 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1swVRZ-000AUr-54 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Oct 2024 01:41:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swVRU-0006Y5-B1; Thu, 03 Oct 2024 19:41:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1swVRR-0006VP-CN for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2024 19:41:05 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swVRM-00035n-5o for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2024 19:41:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=FaXRN75wStPpumKPGK+N1uu7o5MYuwB1ZFU2Ktu06js=; b=NguqQosQjhAQpStVsafMfTmt+qcB4BPahGNT8MznzWwLNPGHAJJubx9WWxkhDBu4wxvmqi4NpJ3ZnatsnQvXuX0oN7LfIzI9US3y2thQRs4R8mpfeK8kDn4V1vp5ozZ0TytJf9BuHqooP/qNxOSqteYBq63oIlTvjyLI/LJCwP2o8nHnhpaIm/7eyllZJriIeAMmwK5l4W7AJ8Ur9/4Ddka5jE0CkHMRwY0V7iEJzj9IusgHUCLxukmz9IiThQemssvOy4lPaCZkno2VM2n9C+LL8AeV8tiHbMCiJ9sVFBmV6yAmAKoZlNGBXVdHBh/Dw4se5FjyEP7Ws5n8sU0MwQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1swVRO-0003bm-H1 for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2024 19:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Oct 2024 23:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73133 X-GNU-PR-Package: emacs Original-Received: via spool by 73133-submit@debbugs.gnu.org id=B73133.172799881713790 (code B ref 73133); Thu, 03 Oct 2024 23:41:02 +0000 Original-Received: (at 73133) by debbugs.gnu.org; 3 Oct 2024 23:40:17 +0000 Original-Received: from localhost ([127.0.0.1]:34086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swVQf-0003aM-7a for submit@debbugs.gnu.org; Thu, 03 Oct 2024 19:40:17 -0400 Original-Received: from mail-pj1-f46.google.com ([209.85.216.46]:48456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swVQd-0003Wv-Ea for 73133@debbugs.gnu.org; Thu, 03 Oct 2024 19:40:15 -0400 Original-Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2e0c7eaf159so1271515a91.1 for <73133@debbugs.gnu.org>; Thu, 03 Oct 2024 16:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727998747; x=1728603547; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=FaXRN75wStPpumKPGK+N1uu7o5MYuwB1ZFU2Ktu06js=; b=LijccpeB50o+a6vvUXcVwwG5mE1+8TdHXYZGJVZQrJeRZpI9ZMAprmEo0Zo1qAPE1p UeUayA/eHFzQLqDPZcDpdWBPIMr9fmb3CbvHz53IR5+S5TVx1+2feBMvt0uGllqGDJtS 0we5bSGyVPOgkWT/g1z4MPFGiKHtlJc2a1yovgfwQppWmsXiKcqG3EmbUlb26zuAhy9N mFzOO4iR8Ybmah+39/IA+9hVrtyOcVuh1C2TFFr4EKg1ocdO2Kl0pIK3g58uzi/VZd5k IFrutbXDFZhAS68gNpt/pSP/XuRpu5O3nXnuYSp+1CpVFl7dHiPtHAxZUHfOiD6v6dbX tY+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727998747; x=1728603547; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FaXRN75wStPpumKPGK+N1uu7o5MYuwB1ZFU2Ktu06js=; b=r6X5RAO58LCsuFYMlAZA6n1C03JkzQcIiymRVT2cKEkXUeCXh74AgHjQpbDIdvC5YK eydB7a75ZuP/YDRzai8X+1Xv9q6IO2eQ64Ah9/ukYoZR3U/C9iCt7DvG1P/g70Mwb0Th yw8dxnBI7nLK6naFCht01erztMDrZ+4OV5ndJODRvaldqspVonVngNsyMELTNavJMDcA zqikYlFmksCSDgjHTHVlccbItKZzcdyJKNZPHZ5XKqSLZKnNoQwCpqO2QYoQ/wgrmud0 hAleD+ya4J4EKEvWjVwRP3oZoBaX0eImKu+IsF2PIIGlTButZK5FJCDX/VY9Ak/0fpGD fm8Q== X-Forwarded-Encrypted: i=1; AJvYcCXOjE38E6l3CGvJTNW9NfIrWiz9vcgMxMtS/y3/aFgByDwd/Ao0HBITz3V8xyxPOLoOjm816g==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yx+Th6YtB/JgHCTuCDHmwSd42mKKG5w7lLrvOdKoh/KnN1XUgyQ lYwroJCXWhz2Xm5dRqfgr1lsKV0Bp26/iG4p9GAhjwFo+u30Ue+v X-Google-Smtp-Source: AGHT+IGcJLjOlhn0lf7AKLp/nnc9qNk1H3b8fM6B9MjzC1xd0J5N5nm6Bs9Unb3p3pOY3NSbTMBCqg== X-Received: by 2002:a17:90a:fd87:b0:2da:6812:c1bd with SMTP id 98e67ed59e1d1-2e1e621f1e7mr943762a91.15.1727998747141; Thu, 03 Oct 2024 16:39:07 -0700 (PDT) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-2e1e83ca284sm98691a91.11.2024.10.03.16.39.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Oct 2024 16:39:06 -0700 (PDT) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292930 Archived-At: 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