cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Download a file where login data must be passed SOLVED

From: Jay Blanchard <jay.blanchard_at_niicommunications.com>
Date: Wed, 26 Jun 2002 14:58:13 -0500

[snip]
I have tried both of the following and neither retrieve the actual zip file.
I do get back the HTML error file contained in a file of the same name as
the requested zip file, which I can then cat and see the HTML.

Any suggestions, am I missing something?

curl -O https://theserver/Download/2002061904.zip -d
"custName=cust&name=name&password=pass&submit=submit"

curl -d "custName=cust&name=name&password=pass&submit=submit" -O
https://theserver/Download/2002061904.zip
[/snip]

It had to do with the URL of the file, due to some kind of URL munging at
the source of the file to be downloaded. The URL is extended with a ?
followed by additional information. This additional information also had
some name=value pairs. For each special character such as ?, =, or & they
had to be escaped with a backslash. Then cURL was able to perform the
download from the command line with no problems whatsoever.

Thanks!

Jay

-------------------------------------------------------
This sf.net email is sponsored by: Jabber Inc.
Don't miss the IM event of the season | Special offer for OSDN members!
JabberConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn
Received on 2002-06-26