summaryrefslogtreecommitdiffstats
path: root/lib/private/streamer.php
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2015-09-24 22:31:05 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-28 11:46:54 +0200
commit057994f4aa7d60428c4c097798b0fa12863c1d76 (patch)
tree9c45fb7d15176f47100b8e40a0b9cab4190895a2 /lib/private/streamer.php
parent027fb4e3fe44f3ca075c96258afe55438f98dd6c (diff)
downloadnextcloud-server-057994f4aa7d60428c4c097798b0fa12863c1d76.tar.gz
nextcloud-server-057994f4aa7d60428c4c097798b0fa12863c1d76.zip
Uniform behavour for tar and zip
Diffstat (limited to 'lib/private/streamer.php')
-rw-r--r--lib/private/streamer.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/streamer.php b/lib/private/streamer.php
index 2502807330b..48a926f42f8 100644
--- a/lib/private/streamer.php
+++ b/lib/private/streamer.php
@@ -48,7 +48,12 @@ class Streamer {
*/
public function sendHeaders($name){
$extension = $this->streamerInstance instanceof ZipStreamer ? '.zip' : '.tar';
- $this->streamerInstance->sendHeaders($name . $extension);
+ $fullName = $name . $extension;
+ // ZipStreamer does not escape name in Content-Disposition atm
+ if ($this->streamerInstance instanceof ZipStreamer) {
+ $fullName = rawurlencode($fullName);
+ }
+ $this->streamerInstance->sendHeaders($fullName);
}
/**