GNU bug report logs - #36268
url-mime-charset-string is excessively long

Previous Next

Package: emacs;

Reported by: Andreas Schwab <schwab <at> linux-m68k.org>

Date: Mon, 17 Jun 2019 20:43:02 UTC

Severity: normal

Tags: fixed

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36268 in the body.
You can then email your comments to 36268 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36268; Package emacs. (Mon, 17 Jun 2019 20:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Schwab <schwab <at> linux-m68k.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 17 Jun 2019 20:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: bug-gnu-emacs <at> gnu.org
Subject: url-mime-charset-string is excessively long
Date: Mon, 17 Jun 2019 22:41:41 +0200
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).

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36268; Package emacs. (Tue, 09 Jul 2019 01:41:02 GMT) Full text and rfc822 format available.

Message #8 received at 36268 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 36268 <at> debbugs.gnu.org
Subject: Re: bug#36268: url-mime-charset-string is excessively long
Date: Tue, 09 Jul 2019 03:40:47 +0200
Andreas Schwab <schwab <at> linux-m68k.org> 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
=> nil

current-language-environment
=> "English"

(set-language-environment "English")
=> t

url-mime-charset-string
=>
"utf-8;q=1, gb2312;q=0.5, iso-8859-1;q=0.5, big5;q=0.5, iso-2022-jp;q=0.5, shift_jis;q=0.5, euc-tw;q=0.5, euc-jp;q=0.5, euc-jis-2004;q=0.5, euc-kr;q=0.5, us-ascii;q=0.5, utf-7;q=0.5, hz-gb-2312;q=0.5, big5-hkscs;q=0.5, gbk;q=0.5, gb18030;q=0.5, iso-8859-5;q=0.5, koi8-r;q=0.5, koi8-u;q=0.5, cp866;q=0.5, koi8-t;q=0.5, windows-1251;q=0.5, cp855;q=0.5, iso-8859-2;q=0.5, iso-8859-3;q=0.5, iso-8859-4;q=0.5, iso-8859-9;q=0.5, iso-8859-10;q=0.5, iso-8859-13;q=0.5, iso-8859-14;q=0.5, iso-8859-15;q=0.5, windows-1250;q=0.5, windows-1252;q=0.5, windows-1254;q=0.5, windows-1257;q=0.5, cp775;q=0.5, cp850;q=0.5, cp852;q=0.5, cp857;q=0.5, cp858;q=0.5, cp860;q=0.5, cp861;q=0.5, cp863;q=0.5, cp865;q=0.5, cp437;q=0.5, macintosh;q=0.5, next;q=0.5, hp-roman8;q=0.5, adobe-standard-encoding;q=0.5, iso-8859-16;q=0.5, iso-8859-7;q=0.5, windows-1253;q=0.5, cp737;q=0.5, cp851;q=0.5, cp869;q=0.5, iso-8859-8;q=0.5, windows-1255;q=0.5, cp862;q=0.5, iso-2022-jp-2004;q=0.5, cp874;q=0.5, iso-8859-11;q=0.5, viscii;q=0.5, windows-1258;q=0.5, iso-8859-6;q=0.5, windows-1256;q=0.5, iso-2022-cn;q=0.5, iso-2022-cn-ext;q=0.5, iso-2022-jp-2;q=0.5, iso-2022-kr;q=0.5, utf-16le;q=0.5, utf-16be;q=0.5, utf-16;q=0.5, x-ctext;q=0.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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 09 Jul 2019 01:45:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 36268 <at> debbugs.gnu.org and Andreas Schwab <schwab <at> linux-m68k.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 09 Jul 2019 01:45:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 06 Aug 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 263 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.