| Project: | ProjectPier |
| Version: | 0.8.5.0-Beta1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | coccyx |
| Status: | new |
Jump to:
Description
i had this bug in an earlier version too.
now i tried to get a look behind the scenes.
# download of files always called: index.[extension]
this line in environment/functions/files.php needs to be replaced:
<?php
header("Content-Disposition: $disposition; filename=\"" . $name) . "\"";
?>with:
<?php
header("Content-Disposition: $disposition; filename=\"" . $name ."\"");
?>
There is no context in this report, what problem is being reported? All it says is "i had this bug in an earlier version too",... what bug?
# download of files always called: index.[extension]
This works OK
<?phpheader("Content-Disposition: $disposition; filename=\"" . $name) . "\"";
?>
But, the right line is
<?phpheader("Content-Disposition: $disposition; filename=\"" . $name ."\"");
?>
To make the change go to: environment\functions\files.php line 381
If your files name contain spaces, than the right line to use is
<?php$name = (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) ? rawurlencode($name) : $name;
header("Content-Disposition: $disposition; filename=\"" . $name . "\"");
?>
You must use rawurlencode() because of IE who is replacing spaces with _