[MacPorts] #18736: distname is not percent-encoded before gluing it into the URL
MacPorts
noreply at macports.org
Tue Mar 3 20:22:15 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 ryandesign@…):
Replying to [comment:4 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.
It seems silly if you want to download foo-1.0.tar.gz to request
foo%2d1%2e0%2etar%2egz but I agree it should still work.
> There is also a simple approach using the public http API, which is so
simple that we could drop the wrapper as well.
That would be fine if it works. I had not tried [::http::something] I had
tried [http::something] which was how the example I saw used it. I'm not
so familiar with tcl syntax when it comes to packages.
> 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).
formatQuery is for formatting a query string (e.g. "?a=b&c=d"), but that's
not what we're doing, so I don't feel we should be using that function. It
seems mapReply is the correct function to use.
> 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.
Ok.
--
Ticket URL: <http://trac.macports.org/ticket/18736#comment:5>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list