bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Lars Ingebrigtsen
Subject: bug#24117: 25.1; url-http-create-request: Multibyte text in HTTP request
Date: Thu, 11 Aug 2016 13:05:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Dmitry Gutov <dgutov@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]