Welcome Guest, Not a member yet? Register   Sign In
Possible issue with Helper: Download
#1

[eluser]Unknown[/eluser]
I have successfully been using the force_download functionality, that is, until a client tried using it behind a firewall.

It seems the line:

Code:
header('Content-Type: "'.$mime.'"');

places a hex /x22 (or ") around the content type. From the info I've received, \x22application/octet-stream\x22 for example is not a valid type. Changing lines (the code appears on lines 74 and 84 of download_helper.php) to:

Code:
header('Content-Type: '.$mime);

fixed the problem. Should this change be adopted in future releases?
#2

[eluser]Derek Allard[/eluser]
Great find tmp.agent. Thanks for this contribution. I've recently (in the last 24 hours) been bitten by something that sounds strangely familiar to this. I'm waiting on verification that your suggested change will impact things.

Do you have any references you could share with us - I'd be happy to committ this change if I could verify it was proper behaviour, and not just a buggy firewall.

Oh, and welcome to CI!
#3

[eluser]Unknown[/eluser]
Here are some references:

[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

See the section 14.17 Content-Type, you'll notice that no " characters are placed around the content type.

[2] http://au3.php.net/header

See 'Example 1585. Download dialog'. Again no " characters are placed around the content type.

[3] http://www.freesoft.org/CIE/RFC/1521/4.htm




Theme © iAndrew 2016 - Forum software by © MyBB