cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-826813 ] curl ignores Content-Disposition: attachment

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sat, 08 Dec 2007 06:56:25 -0800

Bugs item #826813, was opened at 2003-10-20 14:06
Message generated for change (Comment added) made by codewiz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=826813&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: client module
Group: wrong behaviour
Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: curl ignores Content-Disposition: attachment

Initial Comment:
hello,
i found some bug / or a thing which curl don't understand
yet:

this is what i do:
- form data are passed using curl.exe to
asp script
- it returns such header:

HTTP/1.0 200 OK
Server:
Microsoft-IIS/5.0
Date: Mon, 20 Oct 2003 11:11:11 GMT
Content-
Disposition: attachment;filename=test.txt
Content-Length:
12
Content-Length: 6028
Content-Type: application/x-
msdownload
Set-Cookie:
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; path=/
Cache-
control: private

- curl should download and store file
&quot;test.txt&quot; (i
use the -O option), but it stores
scriptname.asp
instead and both html response (size 6028b) and
file
attachment (size 12b) are concatenated together :-
(

script works fine under ie and opera.

i'm not header
expert, but the fact that both browsers
interpret response
correctly says me, that there's
something wrong with
curl.

thank you for your great work,
myiang.

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

Comment By: Bernardo Innocenti (codewiz)
Date: 2007-12-08 15:56

Message:
Logged In: YES
user_id=155711
Originator: NO

While not technically a bug, this missing feature is quite annoying with
some web applications.

Try:
 curl -D headers -O
http://koji.fedoraproject.org/koji/getfile?taskID=283237&name=olpc-utils-0.54-1.olpc2.i386.rpm

So I'd like to ask to reopen this bug as a feature request.

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

Comment By: Daniel Stenberg (bagder)
Date: 2003-10-20 14:19

Message:
Logged In: YES
user_id=1110

1. curl doesn't care about Content-Disposition:. -O is
clearly documented to create the file name based on the file
name part of the given URL.

2. curl has no knowledge about the application/x-msdownload
stream format, and it doesn't care. Using curl means saving
the data being downloaded to a file. curl doesn't decode
such data that is being transfered.

I can't see how any of these points is a bug. They're both
intentional design decisions. Feel free to argue for a
different approach, but do that on a curl mailing list, or
even better: provide patches that introduce this
functionality and I'm sure we can work something out.

I'm closing this report. Thanks for your feedback anyway!

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=826813&group_id=976
Received on 2007-12-08

These mail archives are generated by hypermail.

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

File upload with ASP.NET