summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-07-02 16:18:34 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2013-07-02 16:18:34 -0400
commit59bbb0ebd81a256f59d53418a76d4105c51bb84f (patch)
treeceba9402325dbef28ee85d2bb06a28c113e094f5
parent1b511a0916136460b24caeb0bb921914a0dff14e (diff)
downloadhtml5ks-59bbb0ebd81a256f59d53418a76d4105c51bb84f.tar.xz
html5ks-59bbb0ebd81a256f59d53418a76d4105c51bb84f.zip
send X-Content-Duration to let Firefox cache bgm
-rw-r--r--lighttpd.conf42
1 files changed, 42 insertions, 0 deletions
diff --git a/lighttpd.conf b/lighttpd.conf
index 445c0e2..18c9e00 100644
--- a/lighttpd.conf
+++ b/lighttpd.conf
@@ -36,3 +36,45 @@ setenv.add-response-header += (
compress.cache-dir = "/tmp/lighttpd-compress"
compress.filetype = ("text/html", "text/plain", "text/css", "application/javascript", "application/json")
+
+# I hate Firefox.
+$HTTP["url"] =~ ".ogg$" { setenv.add-response-header += ( "X-Content-Duration" => "0" ) }
+$HTTP["url"] == "/dump/bgm/Afternoon.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "176" ) }
+$HTTP["url"] == "/dump/bgm/Ah_Eh_I_Oh_You.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "126" ) }
+$HTTP["url"] == "/dump/bgm/Air_Guitar.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "73" ) }
+$HTTP["url"] == "/dump/bgm/Aria_de_l'Etoile.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "83" ) }
+$HTTP["url"] == "/dump/bgm/Breathlessly.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "113" ) }
+$HTTP["url"] == "/dump/bgm/Caged_Heart.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "81" ) }
+$HTTP["url"] == "/dump/bgm/Cold_Iron.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "182" ) }
+$HTTP["url"] == "/dump/bgm/Comfort.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "158" ) }
+$HTTP["url"] == "/dump/bgm/Concord.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "185" ) }
+$HTTP["url"] == "/dump/bgm/Daylight.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "106" ) }
+$HTTP["url"] == "/dump/bgm/Ease.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "148" ) }
+$HTTP["url"] == "/dump/bgm/Everyday_Fantasy.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "112" ) }
+$HTTP["url"] == "/dump/bgm/Friendship.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "76" ) }
+$HTTP["url"] == "/dump/bgm/Fripperies.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "88" ) }
+$HTTP["url"] == "/dump/bgm/Generic_Happy_Music.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "77" ) }
+$HTTP["url"] == "/dump/bgm/High_Tension.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "53" ) }
+$HTTP["url"] == "/dump/bgm/Hokabi.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "142" ) }
+$HTTP["url"] == "/dump/bgm/Innocence.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "193" ) }
+$HTTP["url"] == "/dump/bgm/Letting_my_Heart_Speak.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "156" ) }
+$HTTP["url"] == "/dump/bgm/Lullaby_of_Open_Eyes.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "189" ) }
+$HTTP["url"] == "/dump/bgm/Moment_of_Decision.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "243" ) }
+$HTTP["url"] == "/dump/bgm/Nocturne.low.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "229" ) }
+$HTTP["url"] == "/dump/bgm/Nocturne.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "229" ) }
+$HTTP["url"] == "/dump/bgm/Out_of_the_Loop.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "145" ) }
+$HTTP["url"] == "/dump/bgm/Painful_History.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "160" ) }
+$HTTP["url"] == "/dump/bgm/Parity.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "129" ) }
+$HTTP["url"] == "/dump/bgm/Passing_of_Time.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "48" ) }
+$HTTP["url"] == "/dump/bgm/Raindrops_and_Puddles.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "155" ) }
+$HTTP["url"] == "/dump/bgm/Red_Velvet.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "208" ) }
+$HTTP["url"] == "/dump/bgm/Romance_in_Andante_II.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "176" ) }
+$HTTP["url"] == "/dump/bgm/Romance_in_Andante.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "64" ) }
+$HTTP["url"] == "/dump/bgm/Sarabande_from_BWV1010,_Musicbox.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "82" ) }
+$HTTP["url"] == "/dump/bgm/School_Days.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "168" ) }
+$HTTP["url"] == "/dump/bgm/Shadow_of_the_Truth.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "130" ) }
+$HTTP["url"] == "/dump/bgm/Standing_Tall.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "177" ) }
+$HTTP["url"] == "/dump/bgm/Stride.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "134" ) }
+$HTTP["url"] == "/dump/bgm/The_Student_Council.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "103" ) }
+$HTTP["url"] == "/dump/bgm/To_Become_One.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "248" ) }
+$HTTP["url"] == "/dump/bgm/Wiosna.ogg" { setenv.add-response-header += ( "X-Content-Duration" => "70" ) }