[MacPorts] #24584: port fetch should use a cookie jar
MacPorts
noreply at macports.org
Wed Apr 21 08:54:26 PDT 2010
#24584: port fetch should use a cookie jar
-------------------------------------+--------------------------------------
Reporter: ryandesign@… | Owner: macports-tickets@…
Type: enhancement | Status: new
Priority: Normal | Milestone: MacPorts 1.9.0
Component: base | Version: 1.8.2
Keywords: | Port:
-------------------------------------+--------------------------------------
Some servers require a cookie to be set before they'll give you the
download you request (for example websvn's server, tigris.org; see
#24583). To accommodate this, `port fetch` should use a cookie jar.
For example, if I try to fetch websvn-2.3.1.tar.gz normally, it keeps
redirecting back and forth between two URLs and the download never
completes:
{{{
$ curl -L --max-redirs 10 -O
http://websvn.tigris.org/files/documents/1380/47525/websvn-2.3.1.tar.gz
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 322 100 322 0 0 101 0 0:00:03 0:00:03 --:--:--
101
curl: (47) Maximum (10) redirects followed
}}}
But if I use a cookie jar, it works fine:
{{{
curl -c /tmp/cookiejar -L --max-redirs 10 -O
http://websvn.tigris.org/files/documents/1380/47525/websvn-2.3.1.tar.gz
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 773k 100 773k 0 0 79601 0 0:00:09 0:00:09 --:--:--
73025
}}}
I imagine fixing this in MacPorts would just entail a small addition to
src/pextlib1.0/curl.c to create a temporary file, pass it to curl using
the CURLOPT_COOKIEJAR option, and delete the temp file afterward.
--
Ticket URL: <http://trac.macports.org/ticket/24584>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list