protected function addContentDispositionHeader()
{
$encodedName = rawurlencode(basename($this->path));
$isIE = preg_match("/MSIE/", $this->request->server["HTTP_USER_AGENT"]);
if ($isIE) {
$this->addHeader('Content-Disposition', 'attachment; filename="' . $encodedName . '"');
} else {
$this->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\'' . $encodedName . '; filepath="' . $encodedName . '"');
}
}