소스 검색

In case the filename contains non ASCII characters then follow rfc6266. fix #253

This will fix the downloaded filename with Edge, IE11 if it contains a non ASCII character.
master
Sébastien Lucas 8 년 전
부모
커밋
456fe586d7
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. +5
    -1
      resources/php-epub-meta/tbszip.php

+ 5
- 1
resources/php-epub-meta/tbszip.php 파일 보기

@@ -645,7 +645,11 @@ class clsTbsZip {
} else {
header ('Pragma: no-cache');
if ($ContentType!='') header ('Content-Type: '.$ContentType);
header('Content-Disposition: attachment; filename="'.$File.'"');
if (strlen($File) != strlen(utf8_decode($File))) {
header('Content-Disposition: attachment; filename="book.epub"; filename*=utf-8\'\'' . rawurlencode($File));
} else {
header('Content-Disposition: attachment; filename="'.$File.'"');
}
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: public');


불러오는 중...
취소
저장