Uniform behavour for tar and zip
This commit is contained in:
parent
027fb4e3fe
commit
057994f4aa
|
@ -48,7 +48,12 @@ class Streamer {
|
||||||
*/
|
*/
|
||||||
public function sendHeaders($name){
|
public function sendHeaders($name){
|
||||||
$extension = $this->streamerInstance instanceof ZipStreamer ? '.zip' : '.tar';
|
$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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue