You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had automatic MIME detection, but it appears to have been removed in d338a81 in favor of http.ServeContent which claims to automatically detect content type.
The type detection is still there, provided automatically in the 'http.ServeContent()' function. Now it also falls back to MIME-sniffing the data to detect the type.
Activity
whyrusleeping commentedon Feb 5, 2015
We had automatic MIME detection, but it appears to have been removed in d338a81 in favor of
http.ServeContentwhich claims to automatically detect content type.travisperson commentedon Feb 5, 2015
The mime package only comes with 9 simple mime types.
Adding more is pretty simple, pulling a list from apache or nginx might be an option.
Apache
http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/conf/mime.types?view=markup
Nginx
https://github.com/nginx/nginx/blob/master/conf/mime.types
jbenet commentedon Feb 5, 2015
thoughts @mappum ?
mappum commentedon Feb 6, 2015
The type detection is still there, provided automatically in the 'http.ServeContent()' function. Now it also falls back to MIME-sniffing the data to detect the type.
mappum commentedon Feb 6, 2015
I'm not sure why the MOV isn't streaming, could it be a non-streamable video codec?
whyrusleeping commentedon Feb 6, 2015
@mappum look at @travisperson's comment.
mappum commentedon Feb 6, 2015
Oops, I missed that.
Interesting, maybe we should make a PR to golang to add those. (But until then we can use those larger lists ourselves).
jbenet commentedon Feb 6, 2015
yeah, let's use the larger list
whyrusleeping commentedon Mar 28, 2015
@travisperson is this fixed?
jbenet commentedon Mar 28, 2015
@travisperson reopen if not