[MacPorts] #18736: distname is not percent-encoded before gluing it into the URL

MacPorts noreply at macports.org
Tue Mar 3 19:03:07 PST 2009


#18736: distname is not percent-encoded before gluing it into the URL
-------------------------------------+--------------------------------------
 Reporter:  ryandesign@…             |       Owner:  macports-tickets@…                   
     Type:  enhancement              |      Status:  new                                  
 Priority:  Normal                   |   Milestone:  MacPorts 1.8.0                       
Component:  base                     |     Version:  1.7.0                                
 Keywords:                           |        Port:                                       
-------------------------------------+--------------------------------------

Comment(by raimue@…):

 According to the man page, libcurl implements
 [http://www.ietf.org/rfc/rfc2396.txt RFC2396], Tcl goes with
 [http://www.ietf.org/rfc/rfc3986.txt RFC3986]. It is not really broken,
 just outdated. Which is not a serious issue, as decoders are advised to
 decode these characters normally.

 There is also a simple approach using the public http API, which is so
 simple that we could drop the wrapper as well. Although calling
 ::http::formatQuery with an odd number of arguments seems not to be
 documented (could also call with an additional empty string and strip the
 last char).
 {{{
 package require http

 proc urlencode {str} {
     return [::http::formatQuery $str]
 }
 }}}

 But if we are going to duplicate this, we should probably copy from the
 [http://tcl.cvs.sourceforge.net/viewvc/tcl/tcl/library/http/http.tcl?view=markup
 latest version] which is not using regsub for performance reasons. It is
 not implemented in C as stated on the Tclers wiki.

-- 
Ticket URL: <http://trac.macports.org/ticket/18736#comment:4>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list