From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: emacs-w3m question Date: Mon, 7 Nov 2022 13:59:26 +0700 Message-ID: References: <878rku8lrg.fsf@desktop.jonjfineman.com> <87h6zhbiid.fsf@dataswamp.org> <87wn8d6z3x.fsf@desktop.jonjfineman.com> <874jvf2a6z.fsf@undisclosedlocation.com> <87wn87bsvh.fsf@undisclosedlocation.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5965"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 07 08:00:09 2022 Return-path: Envelope-to: geh-help-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 1orw76-0001Ku-N4 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 07 Nov 2022 08:00:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orw6i-0000hx-JJ; Mon, 07 Nov 2022 01:59:44 -0500 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 1orw6g-0000hb-Mt for help-gnu-emacs@gnu.org; Mon, 07 Nov 2022 01:59:42 -0500 Original-Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1orw6f-0001Xo-0h for help-gnu-emacs@gnu.org; Mon, 07 Nov 2022 01:59:42 -0500 Original-Received: by mail-wr1-x436.google.com with SMTP id j15so14730780wrq.3 for ; Sun, 06 Nov 2022 22:59:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TZAduEj5BL8nkPCx4/H9+TSwoFN5InocXG8j304m3Uw=; b=Nj53/dFqL87W+LBmNDW9HvxMOO7nMVO7883biH9dsUEKLQlzhKK6KBj6Q3CUK/UADf A15sv6EMTu2bUvKLjxn+wPPb1IUG5xrEdhYiA6agtPc7+wwSYm8i0/0QiFrrpOta8lAG er0LN+iltAviUomQOV3+XVcYkRMqW6eGKOEAkl4v48RocjPelVzXmBZqtylMMnemtN8c cadQWoh2pbc9FNUoCAWlFjvPMfgIhZW+TDg68BwGZgyN9JJFzl2bSomXVbiDIVlhQDFT nbksc8Wrpc+uvvtYkxOVc8cKitDa6Qc+yhNiKFhZobIQaBwIfeJzmexNFEYgbGLW46Su uEIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TZAduEj5BL8nkPCx4/H9+TSwoFN5InocXG8j304m3Uw=; b=XECCIGZa+h6/7z8W98TxL3QjPGXIp9sxXajJarKqjfue3mWUf3swklNyL43SwUJ0n6 pBDXbN34BRzLWmbpziX+7z9zmsOojL+s7bzOhZIv73lgKQKsIjIGJ9pHIYFCrPI4tT1P j9RyMCWe8tFTXbtFoMcqTXsBmrjQxRIuJVrpo/BhhIvvHur06PQ15Eq1y6yQr37A17qt /kplgkHkQY4mSNQvi5j4FiBfY5j8aER8c9ay2fMz7XF70XR9aHqTx+BZZpZfZf2wbY1S Yfs3vAHDnIeSGBsSHHEx5epGlCk5N30It0IfBuFU0Wrjsf89d9DWwa6cUaOHjkLiS0S+ e5LQ== X-Gm-Message-State: ACrzQf2zQ2S8SRPtyJTPa5O0stT+3JVF0xLGBgxvf6BA/Uosvu7YJQak +gQxJ7MI9RtI0jUTUwCYLmpaynQc8BsUOhviFqHtX8DdpQl9tg== X-Google-Smtp-Source: AMsMyM6odtNprIXW3IgutaoKKiKR9/nLC+iowzz3mPxp92UQ/nULkyrXMKGpbASudZi99VoId8VaYGeDBGMNWOczscU= X-Received: by 2002:a5d:5346:0:b0:235:6c05:6272 with SMTP id t6-20020a5d5346000000b002356c056272mr31188843wrv.332.1667804378023; Sun, 06 Nov 2022 22:59:38 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=yurivkhan@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140764 Archived-At: On Mon, 7 Nov 2022 at 13:47, Stefan Monnier via Users list for the GNU Emacs text editor wrote: > Yuri Khan [2022-11-07 13:08:44] wrote: > > After re-reading RFC 9110 =C2=A7 12.5.3, it looks like the client shoul= d > > indicate its supported and preferred content encodings in an > > Accept-Encoding request header. Does w3m.el send one? If it doesn=E2=80= =99t, > > the server may assume any encoding is acceptable. > > Really? That doesn't sound right. Shouldn't the server assume that > only the simplest encodings can be used if the header is missing? > That's the only safe choice, no? Yeah, my intuition also said so and I was about to compose a reply of indignant finger pointing at the sites that spew brotli without any indication that the client would be able to process it, but I decided to look up the spec and changed my mind. This is what it says, after explaining the syntax: : A server tests : whether a content coding for a given representation is acceptable : using these rules: : : 1. If no Accept-Encoding header field is in the request, : any content coding is considered acceptable by the user agent. : 2. If the representation has no content coding, : then it is acceptable by default : unless specifically excluded by the Accept-Encoding header field : stating either "identity;q=3D0" or "*;q=3D0" : without a more specific entry for "identity". : 3. If the representation's content coding is one of the content codings : listed in the Accept-Encoding field value, : then it is acceptable unless it is accompanied by a qvalue of 0. : (As defined in Section 12.4.2, : a qvalue of 0 means "not acceptable".) I checked and similar wordings run back through the original HTTP/1.1 spec (RFC 2616). That version also includes the following: : Note: If the request does not include an Accept-Encoding field, : and if the "identity" content-coding is unavailable, then : content-codings commonly understood by HTTP/1.0 clients (i.e., : "gzip" and "compress") are preferred; some older clients : improperly display messages sent with other content-codings. The : server might also make this decision based on information about : the particular user-agent or client.