#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 ryandesign@…): I searched high and low to see how to do percent-encoding in Tcl. I found a function http::mapReply which does it. It's part of the http module included with Tcl. It seems like I should just be able to do something like this: {{{ package require http return [http::mapReply ${distname}] }}} Unfortunately while I can get this to work with MacPorts tcl, I can't get it to work with the OS-provided tcl; it can't find the http::mapReply procedure. And even if we find out why that is and how to fix it, it won't work because http::mapReply [http://sourceforge.net/tracker/?func=detail&atid=110894&aid=1182373&group_id... was seriously broken] until tcl 8.4.12; Mac OS X 10.4.11 has tcl 8.4.7 so it would not include the fix. The http module appears to have originally been written in tcl (http.tcl) but is now [http://wiki.tcl.tk/14144 apparently written in C]. I copied the tcl code from http.tcl and modified it as suggested in [http://sourceforge.net/tracker/?func=detail&atid=110894&aid=1182373&group_id... the bug report] so that it is not broken. I'll attach the patch I came up with. -- Ticket URL: <http://trac.macports.org/ticket/18736#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS