By stephan on
http://www.monneta.org/ - I've put up a test file you can try.
Problem - the file does not download. Tried many browsers, many OS'es. Only the first few K arrive and then the transfer hangs.
Is this this an Apache configuration issue? Are the headers not being set correctly?
Thanks,
Stephan
Comments
downloaded here fine...
entire file, 5 pages. i had to rename the file, but that was all.
Strange
Maybe this is an indication of the problem? Is the header not setting the file name correctly?
Header problem fixed
Bad header: (note the paragraphs around the data)
HTTP/1.1 200 OK
Date: Sat, 16 Aug 2003 09:33:49 GMT
Server: Apache/1.3.27 (Unix) PHP/4.2.3 DAV/1.0.2 mod_perl/1.23 mod_ssl/2.8.12 OpenSSL/0.9.7
X-Powered-By: PHP/4.2.3
Set-Cookie: PHPSESSID=6a79ca654620b06bb4e6501e0c3f92e1; expires=Mon, 08-Sep-03 13:07:16 GMT; path=/
Expires: Sat, 16 Aug 2003 09:33:56 GMT
Content-Length:
11169
Content-Disposition: attachment; filename=
test.pdf
Content-Type:
application/pdf
Good header:
HTTP/1.1 200 OK
Date: Sat, 16 Aug 2003 09:32:46 GMT
Server: Apache/1.3.27 (Unix) PHP/4.2.3 DAV/1.0.2 mod_perl/1.23 mod_ssl/2.8.12 OpenSSL/0.9.7
Last-Modified: Sat, 16 Aug 2003 09:28:03 GMT
ETag: "1068c0-2ba1-3f3df923"
Accept-Ranges: bytes
Content-Length: 11169
Content-Type: application/pdf
Fixed by doing this:
Old Code:
header("Content-Type: ". check_output($node->filetype));
header("Content-Length: ". check_output($node->filesize));
header("Content-Disposition: attachment; filename=". check_output($node->filename));
New Code:
header("Content-Type: ". $node->filetype);
header("Content-Length: ". $node->filesize);
header("Content-Disposition: attachment; filename=" .$node->filename);