Skip to content

MIME type on gateways?ย #737

Closed
Closed

Description

@jbenet

.mov's still get downloaded for me

Activity

  1. whyrusleeping commented on Feb 5, 2015

    @whyrusleeping
    Member

    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.

  2. travisperson commented on Feb 5, 2015

    @travisperson
    Member

    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

  3. jbenet commented on Feb 5, 2015

    @jbenet
    MemberAuthor

    thoughts @mappum ?

  4. mappum commented on Feb 6, 2015

    @mappum
    Contributor

    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.

  5. mappum commented on Feb 6, 2015

    @mappum
    Contributor

    I'm not sure why the MOV isn't streaming, could it be a non-streamable video codec?

  6. whyrusleeping commented on Feb 6, 2015

    @whyrusleeping
    Member

    @mappum look at @travisperson's comment.

  7. mappum commented on Feb 6, 2015

    @mappum
    Contributor

    @mappum look at @travisperson's comment.

    Oops, I missed that.

    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.

    Interesting, maybe we should make a PR to golang to add those. (But until then we can use those larger lists ourselves).

  8. jbenet commented on Feb 6, 2015

    @jbenet
    MemberAuthor

    yeah, let's use the larger list

  9. whyrusleeping commented on Mar 28, 2015

    @whyrusleeping
    Member

    @travisperson is this fixed?

  10. jbenet commented on Mar 28, 2015

    @jbenet
    MemberAuthor

    @travisperson reopen if not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions