cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3190349 ] save multiple files problem with -d

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sun, 06 Mar 2011 22:03:52 +0000

Bugs item #3190349, was opened at 2011-02-23 18:26
Message generated for change (Settings changed) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3190349&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: http
Group: wrong behaviour
>Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Manfred Noack (manni2)
Assigned to: Daniel Stenberg (bagder)
Summary: save multiple files problem with -d

Initial Comment:
Hi,
referring to bug no. 3174457, bagder was right.

  curl -o file1 http://url1 -o file2 http://url2 -o file3 http://url3
works

I forgot to mention that I was using the -o and -d option like this,

 curl -o file1 -d "param1=1;param2=11" http://url -o file2 -d "param1=2;param2=22" http://url -o file3 -d "param1=3;param2=33" http://url

The url is always the same only the parameters are changing

In this case curl creates file1, file2 and file3 but all files are containing the same content of the last request with "param1=3;param2=33"

I'm using curl 7.20.1 (i686-pc-linux-gnu)

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2011-02-23 18:54

Message:
That's not a bug, that's by design. Allow me to quote from the docs for the
-d option:

If any of these options is used more than once on the same command line,
the data pieces specified will be merged together with a separating
&-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post
chunk that looks like 'name=daniel&skill=lousy'.

IOW: you can't do multiple different POST requests in a single command
line the way you're trying to.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3190349&group_id=976
Received on 2011-03-06

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET