unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Fix bug #11469; treat port number when expanding URL
@ 2012-12-20 20:16 Takafumi Arakaki
  2012-12-21 17:20 ` Takafumi Arakaki
  0 siblings, 1 reply; 2+ messages in thread
From: Takafumi Arakaki @ 2012-12-20 20:16 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 176 bytes --]

Hi,

This is a patch to fix #12374
24.1.50; Incorrect redirect in url-retrieve when URL contains port number
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12374

Best,
Takafumi

[-- Attachment #2: 0001-Fix-bug-12374-treat-port-number-when-expanding-URL.patch --]
[-- Type: application/octet-stream, Size: 1074 bytes --]

From c0ca5cba23342591aae279fe91e8809ebfe128a6 Mon Sep 17 00:00:00 2001
From: Takafumi Arakaki <aka.tkf@gmail.com>
Date: Thu, 20 Dec 2012 21:02:48 +0100
Subject: [PATCH] Fix bug #12374; treat port number when expanding URL

Previously "(url-port defobj)" was not used as "(url-port urlobj)"
returns non-nil always.
---
 lisp/url/url-expand.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/url/url-expand.el b/lisp/url/url-expand.el
index 4bf13f4..8a6dc2b 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."
       ;; 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))))
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix bug #11469; treat port number when expanding URL
  2012-12-20 20:16 [PATCH] Fix bug #11469; treat port number when expanding URL Takafumi Arakaki
@ 2012-12-21 17:20 ` Takafumi Arakaki
  0 siblings, 0 replies; 2+ messages in thread
From: Takafumi Arakaki @ 2012-12-21 17:20 UTC (permalink / raw)
  To: emacs-devel

Oops, I put the wrong bug number in the mail title.

Also, I should have explained clearly.  This is the bug solved by the
patch I sent:

Consider the following code::

    (url-expand-file-name "/path" "http://127.0.0.1:9999")

Previously it returned "http://127.0.0.1/path", which does not contain
the right port number.  Now it returns "http://127.0.0.1:9999/path".

--
Takafumi


On Thu, Dec 20, 2012 at 9:16 PM, Takafumi Arakaki <aka.tkf@gmail.com> wrote:
> Hi,
>
> This is a patch to fix #12374
> 24.1.50; Incorrect redirect in url-retrieve when URL contains port number
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12374
>
> Best,
> Takafumi



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-21 17:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-20 20:16 [PATCH] Fix bug #11469; treat port number when expanding URL Takafumi Arakaki
2012-12-21 17:20 ` Takafumi Arakaki

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).