mod_deflate brakes streaming of audio/video in Firefox (with combination of Quicktime plugin)

Submitted by Jochus on Tue, 11/01/2011 - 09:54 | Posted in: Linux


I recently had a problem with Firefox 3.6.12 and the Quicktime plugin. When I wanted to play an audio file, the audio file gets cut after 3 seconds, even if the audio file was longer than 3 seconds.
The problem was related to the mod_deflate compression of Apache HTTPD on our files. You need to disable this option for audio/video files.

We changed this detail in our .htaccess file:



# Insert filter
SetOutputFilter DEFLATE

# 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

# Don't compress images/audio/video
SetEnvIfNoCase Request_URI \\.(?:gif|jpe?g|png|mp3|mp4|wav|avi|mpe?g)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content

Header append Vary User-Agent env=!dont-vary


Add new comment

The content of this field is kept private and will not be shown publicly.

Full HTML

  • Lines and paragraphs break automatically.
  • You can caption images (data-caption="Text"), but also videos, blockquotes, and so on.
  • Web page addresses and email addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <cpp>, <css>, <html5>, <java>, <javascript>, <php>, <sql>, <xml>. The supported tag styles are: <foo>, [foo].
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.