From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#36268: url-mime-charset-string is excessively long Date: Tue, 09 Jul 2019 03:40:47 +0200 Message-ID: <87r270f0io.fsf@mouse.gnus.org> References: <87r27s3px6.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="180157"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 36268@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 09 03:41:19 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkf8B-000kcl-1W for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 03:41:19 +0200 Original-Received: from localhost ([::1]:46012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkf81-0002g7-OT for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jul 2019 21:41:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33724) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkf7x-0002fo-2u for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2019 21:41:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkf7v-0001kn-PD for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2019 21:41:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51241) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkf7u-0001kY-F4 for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2019 21:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkf7u-0004l6-9k for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2019 21:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 01:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36268 X-GNU-PR-Package: emacs Original-Received: via spool by 36268-submit@debbugs.gnu.org id=B36268.156263645418271 (code B ref 36268); Tue, 09 Jul 2019 01:41:02 +0000 Original-Received: (at 36268) by debbugs.gnu.org; 9 Jul 2019 01:40:54 +0000 Original-Received: from localhost ([127.0.0.1]:60062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkf7m-0004kd-Co for submit@debbugs.gnu.org; Mon, 08 Jul 2019 21:40:54 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:37284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkf7j-0004kU-OP for 36268@debbugs.gnu.org; Mon, 08 Jul 2019 21:40:52 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkf7g-0007i9-38; Tue, 09 Jul 2019 03:40:50 +0200 In-Reply-To: <87r27s3px6.fsf@igel.home> (Andreas Schwab's message of "Mon, 17 Jun 2019 22:41:41 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162419 Archived-At: Andreas Schwab writes: > The string generated by url-mime-charset-string is 1201 characters long. > That is longer than what some web servers accept as the length of a > request header (for the Accept-charset header sent by > url-http-create-request). My url-mime-charset-string is nil. And this all seems really confused: (defvar url-mime-charset-string nil "String to send in the Accept-charset: field in HTTP requests. The MIME charset corresponding to the most preferred coding system is given priority 1 and the rest are given priority 0.5.") (defun url-set-mime-charset-string () (setq url-mime-charset-string (url-mime-charset-string))) ;; Regenerate if the language environment changes. (add-hook 'set-language-environment-hook 'url-set-mime-charset-string) So... if you change the language environment after you've loaded url-vars.el, then you will suddenly have a value in url-mime-charset-string? Let's try! url-mime-charset-string =3D> nil current-language-environment =3D> "English" (set-language-environment "English") =3D> t url-mime-charset-string =3D> "utf-8;q=3D1, gb2312;q=3D0.5, iso-8859-1;q=3D0.5, big5;q=3D0.5, iso-2022-jp= ;q=3D0.5, shift_jis;q=3D0.5, euc-tw;q=3D0.5, euc-jp;q=3D0.5, euc-jis-2004;q= =3D0.5, euc-kr;q=3D0.5, us-ascii;q=3D0.5, utf-7;q=3D0.5, hz-gb-2312;q=3D0.5= , big5-hkscs;q=3D0.5, gbk;q=3D0.5, gb18030;q=3D0.5, iso-8859-5;q=3D0.5, koi= 8-r;q=3D0.5, koi8-u;q=3D0.5, cp866;q=3D0.5, koi8-t;q=3D0.5, windows-1251;q= =3D0.5, cp855;q=3D0.5, iso-8859-2;q=3D0.5, iso-8859-3;q=3D0.5, iso-8859-4;q= =3D0.5, iso-8859-9;q=3D0.5, iso-8859-10;q=3D0.5, iso-8859-13;q=3D0.5, iso-8= 859-14;q=3D0.5, iso-8859-15;q=3D0.5, windows-1250;q=3D0.5, windows-1252;q= =3D0.5, windows-1254;q=3D0.5, windows-1257;q=3D0.5, cp775;q=3D0.5, cp850;q= =3D0.5, cp852;q=3D0.5, cp857;q=3D0.5, cp858;q=3D0.5, cp860;q=3D0.5, cp861;q= =3D0.5, cp863;q=3D0.5, cp865;q=3D0.5, cp437;q=3D0.5, macintosh;q=3D0.5, nex= t;q=3D0.5, hp-roman8;q=3D0.5, adobe-standard-encoding;q=3D0.5, iso-8859-16;= q=3D0.5, iso-8859-7;q=3D0.5, windows-1253;q=3D0.5, cp737;q=3D0.5, cp851;q= =3D0.5, cp869;q=3D0.5, iso-8859-8;q=3D0.5, windows-1255;q=3D0.5, cp862;q=3D= 0.5, iso-2022-jp-2004;q=3D0.5, cp874;q=3D0.5, iso-8859-11;q=3D0.5, viscii;q= =3D0.5, windows-1258;q=3D0.5, iso-8859-6;q=3D0.5, windows-1256;q=3D0.5, iso= -2022-cn;q=3D0.5, iso-2022-cn-ext;q=3D0.5, iso-2022-jp-2;q=3D0.5, iso-2022-= kr;q=3D0.5, utf-16le;q=3D0.5, utf-16be;q=3D0.5, utf-16;q=3D0.5, x-ctext;q= =3D0.5" That is... a very strange interface. And nobody will never, ever want to have that as an URL header. I'm removing the set-language-environment-hook thing. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no