GNU bug report logs - #24117
25.1; url-http-create-request: Multibyte text in HTTP request

Previous Next

Package: emacs;

Reported by: Sho Takemori <stakemorii <at> gmail.com>

Date: Sun, 31 Jul 2016 08:28:02 UTC

Severity: normal

Found in version 25.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: stakemorii <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>, schwab <at> linux-m68k.org, 24117 <at> debbugs.gnu.org
Subject: bug#24117: 25.1; url-http-create-request: Multibyte text in HTTP request
Date: Thu, 11 Aug 2016 13:05:12 +0200
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> This one seems more conservative, but it'll require a manual merge to
> master. The other one is very trivial, will merge automatically, but
> might cause problems for potential less-careful uses of
> url-generic-parse-url.

Yes, the fix here should be in url-http-create-request, not in the URL
parsing functions.  The main issue here is that the URL request buffer
is a multibyte buffer and (as with all network connection buffers), it
shouldn't be.  (Or, rather, that function just creates a string instead
of a buffer, but the same principle applies.)

But I think this fix looks OK:

> -	 (host (url-host url-http-target-url))
> +	 (host (url-http--encode-string (url-host url-http-target-url)))
>  	 (auth (if (cdr-safe (assoc "Authorization" url-http-extra-headers))

(etc)

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




This bug report was last modified 8 years and 12 days ago.

Previous Next


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