add mime types for video in snap

11 views
Skip to first unread message

Henry Laxen

unread,
Oct 4, 2012, 11:48:10 PM10/4/12
to snap_fr...@googlegroups.com
Dear Snappers,

Any chance of adding:

  ( ".mp4"     , "video/mp4"                         ),
  ( ".ogg"     , "video/ogg"                         ),
  ( ".ogv"     , "video/ogg"                         ),
  ( ".webm"    ,  "video/webm"                       ),

to Snap.Util.FileServe so that my video files serve properly?
Right now they are served as "application/octet-stream" which
firefox does not like.  It doesn't seem to bother google chrome,
however.

Evidence:
wget -S http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4                                                                                       ──(Thu,Oct04)─┘
Connecting to clips.vorwaerts-gmbh.de (clips.vorwaerts-gmbh.de)|78.46.4.188|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Date: Fri, 05 Oct 2012 03:17:34 GMT
  Server: Apache
  Last-Modified: Tue, 09 Feb 2010 02:50:20 GMT
  ETag: "af821c-5416d8-47f21fa7d3300"
  Accept-Ranges: bytes
  Content-Length: 5510872
  Cache-Control: max-age=31536000
  Expires: Sat, 05 Oct 2013 03:17:34 GMT
  Keep-Alive: timeout=15, max=100
  Connection: Keep-Alive
  Content-Type: video/mp4
Length: 5510872 (5.3M) [video/mp4]
Saving to: `big_buck_bunny.mp4'


While on my local server:

wget -S http://nadineloveshenry.localdomain:8888/jewels/images/mneme.mp4                                                                        ──(Thu,Oct04)─┘
Resolving nadineloveshenry.localdomain (nadineloveshenry.localdomain)... 127.0.0.1
Connecting to nadineloveshenry.localdomain (nadineloveshenry.localdomain)|127.0.0.1|:8888... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Server: Snap/0.9.0
  Date: Fri, 05 Oct 2012 03:10:58 GMT
  Last-Modified: Fri, 05 Oct 2012 02:04:46 GMT
  Accept-Ranges: bytes
  Content-Type: application/octet-stream
  Content-Length: 276305
Length: 276305 (270K) [application/octet-stream]
Saving to: `mneme.mp4'

Thanks in advance,
Henry Laxen

Gregory Collins

unread,
Oct 5, 2012, 12:00:46 AM10/5/12
to snap_fr...@googlegroups.com
Hi,

Please send a github pull request :)

G


--
 
 
 



--
Gregory Collins <gr...@gregorycollins.net>
Reply all
Reply to author
Forward
0 new messages