aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakafumi Arakaki2012-12-22 10:59:08 +0800
committerChong Yidong2012-12-22 10:59:08 +0800
commit33d359875ab09abce0752e1502b8891f03fe9743 (patch)
tree3e82262c039920fd5e5aa01695b74542c147f558
parentc545e313b55b8efd1565f1ee50164026134a73dc (diff)
downloademacs-33d359875ab09abce0752e1502b8891f03fe9743.tar.gz
emacs-33d359875ab09abce0752e1502b8891f03fe9743.zip
Two fixes for the URL library (tiny change).
* url-expand.el (url-default-expander): Don't calculate a default url port before checking url-type. * url-http.el (url-http-end-of-document-sentinel): Bind relevant url-request-* variables around the call to url-http. Fixes: debbugs:11469 debbugs:12374
-rw-r--r--lisp/url/ChangeLog12
-rw-r--r--lisp/url/url-expand.el2
-rw-r--r--lisp/url/url-http.el7
-rw-r--r--lisp/url/url-parse.el5
4 files changed, 21 insertions, 5 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index fb4839358b9..6da1e545be5 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,15 @@
12012-12-22 Takafumi Arakaki <aka.tkf@gmail.com> (tiny change)
2
3 * url-http.el (url-http-end-of-document-sentinel): Bind relevant
4 url-request-* variables around the call to url-http (Bug#11469).
5
6 * url-expand.el (url-default-expander): Don't calculate a default
7 url port before checking url-type (Bug#12374).
8
92012-12-22 Chong Yidong <cyd@gnu.org>
10
11 * url-parse.el (url-port): Doc fix.
12
12012-12-03 Chong Yidong <cyd@gnu.org> 132012-12-03 Chong Yidong <cyd@gnu.org>
2 14
3 * url-misc.el (url-do-terminal-emulator): Use make-term instead of 15 * url-misc.el (url-do-terminal-emulator): Use make-term instead of
diff --git a/lisp/url/url-expand.el b/lisp/url/url-expand.el
index 4bf13f4abe3..8a6dc2b87d4 100644
--- a/lisp/url/url-expand.el
+++ b/lisp/url/url-expand.el
@@ -112,7 +112,7 @@ path components followed by `..' are removed, along with the `..' itself."
112 ;; Well, they told us the scheme, let's just go with it. 112 ;; Well, they told us the scheme, let's just go with it.
113 nil 113 nil
114 (setf (url-type urlobj) (or (url-type urlobj) (url-type defobj))) 114 (setf (url-type urlobj) (or (url-type urlobj) (url-type defobj)))
115 (setf (url-port urlobj) (or (url-port urlobj) 115 (setf (url-port urlobj) (or (url-portspec urlobj)
116 (and (string= (url-type urlobj) 116 (and (string= (url-type urlobj)
117 (url-type defobj)) 117 (url-type defobj))
118 (url-port defobj)))) 118 (url-port defobj))))
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 73d53e08c59..1f705f6a0f9 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -890,8 +890,11 @@ should be shown to the user."
890 (url-http-activate-callback) 890 (url-http-activate-callback)
891 ;; Call `url-http' again if our connection expired. 891 ;; Call `url-http' again if our connection expired.
892 (erase-buffer) 892 (erase-buffer)
893 (url-http url-current-object url-callback-function 893 (let ((url-request-method url-http-method)
894 url-callback-arguments (current-buffer)))) 894 (url-request-extra-headers url-http-extra-headers)
895 (url-request-data url-http-data))
896 (url-http url-current-object url-callback-function
897 url-callback-arguments (current-buffer)))))
895 ((url-http-parse-headers) 898 ((url-http-parse-headers)
896 (url-http-activate-callback)))))) 899 (url-http-activate-callback))))))
897 900
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index 2efabed5cd8..b196fbb1531 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -39,13 +39,14 @@
39 silent (use-cookies t)) 39 silent (use-cookies t))
40 40
41(defsubst url-port (urlobj) 41(defsubst url-port (urlobj)
42 "Return the port number for the URL specified by URLOBJ." 42 "Return the port number for the URL specified by URLOBJ.
43If the port spec is nil (i.e. URLOBJ specifies no port number),
44return the default port number for URLOBJ's scheme."
43 (declare (gv-setter (lambda (port) `(setf (url-portspec ,urlobj) ,port)))) 45 (declare (gv-setter (lambda (port) `(setf (url-portspec ,urlobj) ,port))))
44 (or (url-portspec urlobj) 46 (or (url-portspec urlobj)
45 (if (url-type urlobj) 47 (if (url-type urlobj)
46 (url-scheme-get-property (url-type urlobj) 'default-port)))) 48 (url-scheme-get-property (url-type urlobj) 'default-port))))
47 49
48
49(defun url-path-and-query (urlobj) 50(defun url-path-and-query (urlobj)
50 "Return the path and query components of URLOBJ. 51 "Return the path and query components of URLOBJ.
51These two components are stored together in the FILENAME slot of 52These two components are stored together in the FILENAME slot of