Jump to content

cURL vs Content-Type: application/force-download


exitof99

Recommended Posts

Okay, I'm stumped. I've been searching for hours on how to retrieve a csv file using cURL when the HTTP headers say 'force-download'.

 

The process:

 

1. Log in to website.

 

2. 'Click' link to download dynamically generated csv file.

 

Step 1 works perfectly, a cookie file is being used to store the session variable.

 

Step 2 returns *only*:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: max_age=0
Content-disposition: attachment; filename="filename.csv"
Pragma: public
Content-Type: application/force-download
Transfer-Encoding: chunked
Date: Wed, 19 Aug 2009 22:54:58 GMT

 

If a user manually goes through this process, they receive the 'Save or Open' dialog which awaits their response before continuing. How do I get cURL to accept the download?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.