emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

First call of url-generic-parse-url<f> is broken


From: Shun-ichi GOTO
Subject: First call of url-generic-parse-url<f> is broken
Date: Mon, 13 Nov 2006 15:21:47 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.0.90 (i386-msvc-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/3.00-dev (KIKU)

The function url-generic-parse-url<f> returns strange data on the first call.

Here is actual example:

;; this is my local setting
(setq url-proxy-services
      '(("http" . "zippo:8080"))

;; first try
(url-generic-parse-url "http://www.meadowy.org/~gotoh/projects/trac-wiki/xmlrpc\
")
=> ["http" nil nil "www.meadowy.org" 80 "http://zippo:8080/"; nil nil t]
                                        ~~~~~~~~~~~~~~~~~~~
                                           strange!

;; again
(url-generic-parse-url "http://www.meadowy.org/~gotoh/projects/trac-wiki/xmlrpc\
")
=> ["http" nil nil "www.meadowy.org" 80 "/~gotoh/projects/trac-wiki/xmlrpc" nil 
ni\
l t]


I chaised and found a bug.
url-generic-parse-url<f> calls url-scheme-get-property<f> in the
middle of the parsing to get port number for scheme.
But url-scheme-get-property<f> invoke url-generic-parse-url<f> again
to parse url value in url-proxy-services.
Because url-generic-parse-url<f> uses fixed named buffer,
the buffer contents for first parse is broken by 2nd one.

I suggest using with-temp-buffer<f> for allocating working buffer
instead of get-buffer-create<f>.
Or move use of url-schem-get-property to end of function
before (vector ...).

--- Regards,
 Shun-ichi Goto  <address@hidden>
   R&D Group, TAIYO Corp., Tokyo, JAPAN






reply via email to

[Prev in Thread] Current Thread [Next in Thread]