[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#23750: 25.0.95; bug in url-retrieve or json.el
From: |
Eli Zaretskii |
Subject: |
Re: bug#23750: 25.0.95; bug in url-retrieve or json.el |
Date: |
Fri, 02 Dec 2016 16:24:26 +0200 |
> Cc: address@hidden, address@hidden, address@hidden,
> address@hidden
> From: Dmitry Gutov <address@hidden>
> Date: Fri, 2 Dec 2016 15:18:48 +0200
>
> > it is okay to silently DTRT for
> > that class only, in some central place that serves the class.
>
> Those central places are coding.c and url/url-*.el.
That's not what I meant (and coding.c is definitely not the place),
but let's leave this alone.
> diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
> index e0e080e..affd5c2 100644
> --- a/lisp/url/url-http.el
> +++ b/lisp/url/url-http.el
> @@ -358,9 +358,8 @@ url-http-create-request
> ;; Any data
> url-http-data))
> ;; Bug#23750
> - (unless (= (string-bytes request)
> - (length request))
> - (error "Multibyte text in HTTP request: %s" request))
> + (when (mutibyte-string-p request)
> + (error "Multibyte text in HTTP request: %s, please translate any
> multibyte components to unibyte using `encode-coding-string'" request))
> (url-http-debug "Request is: \n%s" request)
> request))
This will also reject pure-ASCII strings that just happen to be
multibyte, although there will be no problem with such an HTTP
request. Do we really want to disallow that use case?
Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, Lars Ingebrigtsen, 2016/12/02