]> git.eshelyaron.com Git - emacs.git/commitdiff
Two fixes for the URL library (tiny change).
authorTakafumi Arakaki <aka.tkf@gmail.com>
Sat, 22 Dec 2012 02:59:08 +0000 (10:59 +0800)
committerChong Yidong <cyd@gnu.org>
Sat, 22 Dec 2012 02:59:08 +0000 (10:59 +0800)
* 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
lisp/url/ChangeLog
lisp/url/url-expand.el
lisp/url/url-http.el
lisp/url/url-parse.el

index fb4839358b9a8de2362400fdab95ffa637e047ff..6da1e545be51e2fca609508ce486d407f62c58c6 100644 (file)
@@ -1,3 +1,15 @@
+2012-12-22  Takafumi Arakaki  <aka.tkf@gmail.com>  (tiny change)
+
+       * url-http.el (url-http-end-of-document-sentinel): Bind relevant
+       url-request-* variables around the call to url-http (Bug#11469).
+
+       * url-expand.el (url-default-expander): Don't calculate a default
+       url port before checking url-type (Bug#12374).
+
+2012-12-22  Chong Yidong  <cyd@gnu.org>
+
+       * url-parse.el (url-port): Doc fix.
+
 2012-12-03  Chong Yidong  <cyd@gnu.org>
 
        * url-misc.el (url-do-terminal-emulator): Use make-term instead of
index 4bf13f4abe3f2c945f6fc12e45fc79f27442981c..8a6dc2b87d451ba68009393e2998245e5dd64bd2 100644 (file)
@@ -112,7 +112,7 @@ path components followed by `..' are removed, along with the `..' itself."
       ;; Well, they told us the scheme, let's just go with it.
       nil
     (setf (url-type urlobj) (or (url-type urlobj) (url-type defobj)))
-    (setf (url-port urlobj) (or (url-port urlobj)
+    (setf (url-port urlobj) (or (url-portspec urlobj)
                                 (and (string= (url-type urlobj)
                                               (url-type defobj))
                                     (url-port defobj))))
index 73d53e08c595f18806be97f7737a93b118c38910..1f705f6a0f95c81feda19a598fd40126a302f92d 100644 (file)
@@ -890,8 +890,11 @@ should be shown to the user."
                 (url-http-activate-callback)
               ;; Call `url-http' again if our connection expired.
               (erase-buffer)
-              (url-http url-current-object url-callback-function
-                        url-callback-arguments (current-buffer))))
+               (let ((url-request-method url-http-method)
+                     (url-request-extra-headers url-http-extra-headers)
+                     (url-request-data url-http-data))
+                 (url-http url-current-object url-callback-function
+                           url-callback-arguments (current-buffer)))))
            ((url-http-parse-headers)
             (url-http-activate-callback))))))
 
index 2efabed5cd85d51b05eb68764ba8e3c9d8a13512..b196fbb15313875e96ff821597cdfb1db2ac3cf2 100644 (file)
   silent (use-cookies t))
 
 (defsubst url-port (urlobj)
-  "Return the port number for the URL specified by URLOBJ."
+  "Return the port number for the URL specified by URLOBJ.
+If the port spec is nil (i.e. URLOBJ specifies no port number),
+return the default port number for URLOBJ's scheme."
   (declare (gv-setter (lambda (port) `(setf (url-portspec ,urlobj) ,port))))
   (or (url-portspec urlobj)
       (if (url-type urlobj)
           (url-scheme-get-property (url-type urlobj) 'default-port))))
 
-
 (defun url-path-and-query (urlobj)
   "Return the path and query components of URLOBJ.
 These two components are stored together in the FILENAME slot of