Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type sniffing #26

Open
stuartpb opened this issue Oct 13, 2016 · 1 comment
Open

Type sniffing #26

stuartpb opened this issue Oct 13, 2016 · 1 comment

Comments

@stuartpb
Copy link
Member

It'd be nice if type could be implied by file extension in the source URL / filename (source or destination), and/or Content-Type on fetch (for sources), and/or some kind of duck typing (for patch bits).

What'd be most crucial would be establishing the precedence - I'm thinking it'd look like (highest to lowest):

  • Explicitly-defined type
  • Content-Type
  • File extension
  • Magic / duck typing
@stuartpb
Copy link
Member Author

The thing is, zip/tar/gz/targz files don't necessarily need to be extracted - but then we're in the world where we've got weird duck-typing logic and specs can have different behaviors that can't be predicted until the request completes.

Though I guess there's the "blobs require an as" rule right now, and anything without that is interpreted as an archive, and that's probably OK? (archives don't have as, they have slice.to iirc)

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

No branches or pull requests

1 participant