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


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sho Takemori <stakemorii <at> gmail.com>
Cc: 24117 <at> debbugs.gnu.org
Subject: Re: bug#24117: 25.1;
 url-http-create-request: Multibyte text in HTTP request
Date: Sun, 31 Jul 2016 17:31:33 +0300
> From: Sho Takemori <stakemorii <at> gmail.com>
> Date: Sun, 31 Jul 2016 17:26:37 +0900
> 
> I got an error "error in process sentinel: url-http-create-request: Multibyte text in HTTP request" when I visited a
> Python file which contains a multibyte character with `anaconda-eldoc-mode' turned on.

That file name should have been encoded by the time it is passed to
url-http.el, so the problem should not have happened, because encoded
strings are unibyte strings.

> At first, I thought this was a bug of anaconda-mode. So I opened an issue in github
> (https://github.com/proofit404/anaconda-mode/issues/189).
> 
> I guess `(= (string-bytes request) (length request))` in `url-http-create-request' should be `(= (string-bytes
> url-http-data) (length url-http-data))`, because `(= (string-bytes request) (length request))` may be `nil' even if
> `(= (string-bytes url-http-data) (length url-http-data))` is `t'.

I don't think I agree in general: all the strings that are used by
url-http-create-request should be unibyte strings.  if they all are
unibyte strings, then I think the situation you describe should not
happen.  However, you didn't provide enough details to analyze the
situation, so perhaps I'm missing something.  Could you please show
all the details, specifically, what were the values of the various
variables used by url-http-create-request to generate the request?
For each value that is a string, please also tell whether it's a
unibyte or a multibyte string.

Thanks.




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.