[Pkg-owncloud-commits] [owncloud] 252/394: Merge pull request #931 from owncloud/stable45_fix_utf8_filenames_in_ie_download
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:12:18 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.
commit 55da127c368309b35e32474af7ca715dfd2f3ca7
Merge: 74f75e6 e02e218
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Tue Dec 25 22:28:52 2012 -0800
Merge pull request #931 from owncloud/stable45_fix_utf8_filenames_in_ie_download
fix utf8 filenames in ie download response header according to rfc5987, ...
apps/files/download.php | 7 ++++++-
lib/files.php | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --cc lib/files.php
index caebaee,a4dbddc..ade11d0
--- a/lib/files.php
+++ b/lib/files.php
@@@ -182,9 -182,14 +182,14 @@@ class OC_Files
$zip=false;
$filename=$dir.'/'.$files;
}
- @ob_end_clean();
+ OC_Util::obEnd();
if($zip or OC_Filesystem::is_readable($filename)) {
- header('Content-Disposition: attachment; filename="'.basename($filename).'"');
+ if ( preg_match( "/MSIE/", $_SERVER["HTTP_USER_AGENT"] ) ) {
+ header( 'Content-Disposition: attachment; filename="' . rawurlencode( basename($filename) ) . '"' );
+ } else {
+ header( 'Content-Disposition: attachment; filename*=UTF-8\'\'' . rawurlencode( basename($filename) )
+ . '; filename="' . rawurlencode( basename($filename) ) . '"' );
+ }
header('Content-Transfer-Encoding: binary');
OC_Response::disableCaching();
if($zip) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list