Search Results for 'mod_deflate 파일 다운로드 문제'


1 POSTS

  1. 2008/01/17 mod_deflate 설정시 파일 다운로드 에러 by 노는총각

mod_deflate 설정시 파일 다운로드 에러

우선 tc//blog/blog/attachment/index.php 파일에서

$attachment['mime'] = $attachment['mime'] == "" ? "application/octet-stream" : $attachment['mime'];

mime타입이 없으면 옥텟스트림으로 mime타입을 바꿔주게 설정하였다.

또 deflate설정을 아래와 같이 변경해 exe파일이면 압축되지 않게 하였다.

물론 blog/attachment/index.php을 수정하지 않고 exe 확장자로 헤더에 정의 되어있으니 상관없긴 하지만
그래도 기분상^^

<Location />
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xhtml+xml
    AddOutputFilterByType DEFLATE text/css application/javascript text/javascript
    AddOutputFilterByType DEFLATE application/x-httpd-php application/x-httpd-fastphp application/x-httpd-eruby
    AddOutputFilterByType DEFLATE application/xml application/rss+xml application/atom+xml image/svg+xml

    # Netscape 4.x has some problems…
    BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4.0[678] no-gzip

    # MSIE masquerades as Netscape, but it is fine
    BrowserMatch bMSIE !no-gzip !gzip-only-text/html

    # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
    # the above regex won't work. You can use the following
    # workaround to get the desired effect:
    #BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html

    # Don't compress images, compressed files, movies, audio files
    SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI .pdf$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI .avi$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI .mov$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI .mp3$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI .mp4$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI .rm$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary

    # n = 1..9 with 9 being the highest compression level. Standard is 6.
    # DeflateCompressionLevel
</Location>

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 노는총각

2008/01/17 14:12 2008/01/17 14:12
Response
No Trackback , No Comment
RSS :
http://blog.zeroidle.com/rss/response/52

Trackback URL : http://blog.zeroidle.com/trackback/52

Leave a comment
[로그인][오픈아이디란?]

블로그 이미지

버그가 없어도 전혀 기쁘지 않아!!!

- 노는총각

Notices

Archives

Calendar

«   2010/07   »
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Site Stats

Total hits:
65292
Today:
38
Yesterday:
158