"That's still in very widespread use"

Yes, I'm aware people use file extensions.  What I'm saying is you can't
trust them :)

" and it's vastly
more robust than trying to deal in potentially-colliding magic numbers"

Which is why we request you pass the type :)




On Tue, Aug 26, 2014 at 7:17 PM, Drake Wilson <[email protected]> wrote:

> On 26/08/14 18:00, Michael DeHaan wrote:
> > Extensions shouldn't be made to be significant, IMHO.   That's a little
> old-school-windowsey.
>
> That's still in very widespread use, and not only in Windows-based
> environments, and it's vastly
> more robust than trying to deal in potentially-colliding magic numbers;
> e.g., the latter means
> hooking up to existing preprocessing systems that attempt to ensure that
> all output files will
> be interpreted within a restricted set of types by name becomes
> impossible.  ("widespread" here
> includes things like Apache and nginx both frequently being configured to
> use such a mapping
> by default.)
>
> Filesystem-level extended attributes would be cleaner than encoding in the
> name, but are less
> convenient to output in a lot of environments.  magic(4) (including
> file(1)) could be really
> dangerous here; you might be able to play around with filtering the set of
> recognized types,
> but egh.
>
> Modern GNU/Linux machines often have /etc/mime.types, which maps
> extensions to media types.
>
>    ---> Drake Wilson
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/53FD1582.3030303%40dasyatidae.net
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgySpd_mxXrApeDJFMJEOJ%2BsBTUzawJaisQAzR%2Bf3_%2BZsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to