I'm having trouble with the filename after retrieving a php generated file download. It is retrieved with:
http://site.com/download/file.php?id=62651
The content disposition header says:
Content-Disposition: attachment; filename*=UTF-8''filename.zip

I want it to end up as "filename.zip", but it ends up as "[EMAIL PROTECTED]" Unfortunately, I'm dealing with hundreds of files of varying types.

I'm using these wgetrc options:
recursive = on
content_disposition = on
verbose = on
dir_prefix = folder
server_response = on

saving the header in FireFox I see:
content-disposition: attachment; filename*=UTF-8''filename.zip
Content-Type: application/octet-stream

I'm successfully saving other files from another site with the correct name that have a header as follows
content-disposition: attachment; filename="flower.zip"
Content-Type: zip

Is my problem due to the differences in the content-disposition: attachment; filename lines above, is it the UTF-8 or something else?

Any help or hints would be appreciated

Here's a logfile of the relevant request/response header exchange that fails:
HTTP request sent, awaiting response...
 HTTP/1.1 200 OK
 Date: Sun, 09 Mar 2008 02:31:23 GMT
 Server: Apache
 Pragma: public
 Content-Disposition: attachment; filename*=UTF-8''filename.zip
 Vary: Accept-Encoding,User-Agent
 Keep-Alive: timeout=5, max=1999
 Connection: Keep-Alive
 Content-Type: application/octet-stream
Length: unspecified [application/octet-stream]
--2008-03-08 21:31:25--  http://site.com/download/file.php?id=62651
Connecting to site.com|70.87.3.196|:80... connected.
HTTP request sent, awaiting response...
 HTTP/1.1 200 OK
 Date: Sun, 09 Mar 2008 02:31:24 GMT
 Server: Apache
 Pragma: public
 Content-Disposition: attachment; filename*=UTF-8''filename.zip
 Content-Length: 125127
 Vary: Accept-Encoding,User-Agent
 Keep-Alive: timeout=5, max=2000
 Connection: Keep-Alive
 Content-Type: application/octet-stream
Length: 125127 (122K) [application/octet-stream]
Saving to: `foldername/site.com/download/[EMAIL PROTECTED]'

Reply via email to