… | |
… | |
35 | |
35 | |
36 | my $cache_headers = "cache-control: max-age=8640000\015\012" |
36 | my $cache_headers = "cache-control: max-age=8640000\015\012" |
37 | . "etag: \"0\"\015\012"; |
37 | . "etag: \"0\"\015\012"; |
38 | |
38 | |
39 | sub content_type { |
39 | sub content_type { |
40 | return "content-type: image/png\015\012" if $_[0] =~ /^\x89PNG/; |
40 | return "content-type: image/png\015\012" if $_[0] =~ /^\x89PNG/; |
41 | return "content-type: image/jpeg\015\012" if $_[0] =~ /^......JFIF/s; |
41 | return "content-type: image/jpeg\015\012" if $_[0] =~ /^......JFIF/s; |
42 | return "content-type: audio/wav\015\012" if $_[0] =~ /^RIFF/; |
42 | return "content-type: audio/wav\015\012" if $_[0] =~ /^RIFF/; |
43 | return "content-type: audio/x-ogg\015\012" if $_[0] =~ /^OggS/; |
43 | return "content-type: audio/ogg\015\012" if $_[0] =~ /^OggS/; |
44 | |
44 | |
45 | "content-type: text/plain\015\012" |
45 | "content-type: text/plain\015\012" |
46 | } |
46 | } |
47 | |
47 | |
48 | sub copy { |
48 | sub copy { |