1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/media/test/make-headers.sh Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,22 @@ 1.4 +# This Source Code Form is subject to the terms of the Mozilla Public 1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.7 + 1.8 +# Script to generate ^header^ files for all media files we use. 1.9 +# This is to ensure that our media files are not cached by necko, 1.10 +# so that our detection as to whether the server supports byte range 1.11 +# requests is not interferred with by Necko's cache. See bug 977398 1.12 +# for details. Necko will fix this in bug 977314. 1.13 + 1.14 +FILES=(`ls *.ogg *.ogv *.webm *.mp3 *.opus *.mp4 *.wav`) 1.15 + 1.16 +rm *.ogg^headers^ *.ogv^headers^ *.webm^headers^ *.mp3^headers^ *.opus^headers^ *.mp4^headers^ *.wav^headers^ 1.17 + 1.18 +# Restore special headers. 1.19 +echo "X-Content-Duration: 1.96" > bug500311.ogv^headers^ 1.20 +echo "X-Content-Duration: 9000" > bug520908.ogv^headers^ 1.21 + 1.22 +for i in "${FILES[@]}" 1.23 +do 1.24 + echo "Cache-Control: no-store" >> $i^headers^ 1.25 +done