GNU bug report logs -
#24117
25.1; url-http-create-request: Multibyte text in HTTP request
Previous Next
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
On 11.08.2016 15:57, Ted Zlatanov wrote:
> DG> On 08/11/2016 11:53 AM, Ted Zlatanov wrote:
>>> Could you add to your patch the cases you've tested? There's a specific
>>> place for URL parsing tests in test/lisp/url/url-parse-tests.el that
>>> would help everyone.
>
> DG> Sure, but only one of the patches affects URL parsing (and Lars prefers the
> DG> other one).
>
> Maybe the tests should be in a separate patch then. Neither your Russian
> example nor Lars' example have a parallel in the tests AFAICS. I'd also
> add the example hostname that Katsumi Yamaoka gave from the w3m source.
Just got around to this. The test I came up with looks like this:
(ert-deftest url-generic-parse-url/multibyte-host-and-path ()
(should (equal (url-generic-parse-url "http://банки.рф/фыва/")
(url-parse-make-urlobj "http" nil nil "банки.рф" nil
"/фыва/" nil nil t))))
But! What behavior would this test? If we're making sure here that
url-generic-parse-url can cope with multibyte characters anywhere in the
URL, the encode-coding-string/decode-coding-string logic in
url-encode-url is extraneous. I'm not sure that it is, or is there are
some edge cases (are they fixable? should we add tests for them?).
So if this test goes in, it should be accompanied with the
simplification of url-encode-url.
Lars, what do you think?
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.