aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Xu2012-04-10 13:22:08 +0200
committerLars Magne Ingebrigtsen2012-04-10 13:22:08 +0200
commita967e26b4011b7efb9714ef93ec503bc89117194 (patch)
tree018d7150433fd985d480b0ada115d9e0a2db9478
parentb12f0439bf5ee30d4e19212993fc8d403de8e3ed (diff)
downloademacs-a967e26b4011b7efb9714ef93ec503bc89117194.tar.gz
emacs-a967e26b4011b7efb9714ef93ec503bc89117194.zip
(url-retrieve-internal): Hexify multibye URL string first when necessary.
Also mention this in the relevant doc strings. Fixes: debbugs:7017
-rw-r--r--lisp/url/ChangeLog10
-rw-r--r--lisp/url/url.el11
2 files changed, 19 insertions, 2 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index c2350e56594..6dcafb49bd6 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,13 @@
12012-04-10 William Xu <william.xwl@gmail.com> (tiny change)
2
3 * url.el (url-retrieve-internal): Hexify multibye URL string first
4 when necessary (bug#7017).
5
62012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
7
8 * url.el (url-retrieve-internal): Mention utf-8 encoding.
9 (url-retrieve): Ditto.
10
12012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> 112012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 12
3 * url-util.el (url-unhex-string): Add an optional CODING-SYSTEM 13 * url-util.el (url-unhex-string): Add an optional CODING-SYSTEM
diff --git a/lisp/url/url.el b/lisp/url/url.el
index 5ced789e4e4..f3ef553bbce 100644
--- a/lisp/url/url.el
+++ b/lisp/url/url.el
@@ -149,7 +149,9 @@ take effect.
149 149
150If SILENT, then don't message progress reports and the like. 150If SILENT, then don't message progress reports and the like.
151If INHIBIT-COOKIES, cookies will neither be stored nor sent to 151If INHIBIT-COOKIES, cookies will neither be stored nor sent to
152the server." 152the server.
153If URL is a multibyte string, it will be encoded as utf-8 and
154URL-encoded before it's used."
153;;; XXX: There is code in Emacs that does dynamic binding 155;;; XXX: There is code in Emacs that does dynamic binding
154;;; of the following variables around url-retrieve: 156;;; of the following variables around url-retrieve:
155;;; url-standalone-mode, url-gateway-unplugged, w3-honor-stylesheets, 157;;; url-standalone-mode, url-gateway-unplugged, w3-honor-stylesheets,
@@ -171,11 +173,16 @@ the list of events, as described in the docstring of `url-retrieve'.
171 173
172If SILENT, don't message progress reports and the like. 174If SILENT, don't message progress reports and the like.
173If INHIBIT-COOKIES, cookies will neither be stored nor sent to 175If INHIBIT-COOKIES, cookies will neither be stored nor sent to
174the server." 176the server.
177If URL is a multibyte string, it will be encoded as utf-8 and
178URL-encoded before it's used."
175 (url-do-setup) 179 (url-do-setup)
176 (url-gc-dead-buffers) 180 (url-gc-dead-buffers)
177 (if (stringp url) 181 (if (stringp url)
178 (set-text-properties 0 (length url) nil url)) 182 (set-text-properties 0 (length url) nil url))
183 (when (multibyte-string-p url)
184 (let ((url-unreserved-chars (append '(?: ?/) url-unreserved-chars)))
185 (setq url (url-hexify-string url))))
179 (if (not (vectorp url)) 186 (if (not (vectorp url))
180 (setq url (url-generic-parse-url url))) 187 (setq url (url-generic-parse-url url)))
181 (if (not (functionp callback)) 188 (if (not (functionp callback))