all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#36268: url-mime-charset-string is excessively long
@ 2019-06-17 20:41 Andreas Schwab
  2019-07-09  1:40 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Schwab @ 2019-06-17 20:41 UTC (permalink / raw)
  To: 36268

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@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#36268: url-mime-charset-string is excessively long
  2019-06-17 20:41 bug#36268: url-mime-charset-string is excessively long Andreas Schwab
@ 2019-07-09  1:40 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-09  1:40 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 36268

Andreas Schwab <schwab@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-09  1:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-17 20:41 bug#36268: url-mime-charset-string is excessively long Andreas Schwab
2019-07-09  1:40 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.