diff --git a/lib/private/streamer.php b/lib/private/streamer.php index 2502807330..48a926f42f 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); } /**