[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] MIME type guessing improved for *nix systems

From: Dan Allen <dan_at_mojavelinux.com>
Date: 2003-03-29 18:36:09 CET

Ben Collins-Sussman (sussman@collab.net) wrote:

> Dan Allen <dan@mojavelinux.com> writes:
>
> > Matthew Hambley (matthew@therealm.demon.co.uk) wrote:
> >
> > > This patch improves subversions ability to guess the MIME type of a file as
> > > it is added or imported. It does this on *nix systems by interogating the
> > > mime.types file. Other platforms may have more appropriate mechanisms.
> > > (for instance on Risc OS a call to the MIME map module) Quite frankly the
> > > build mechanism scares the willies out of me so I have left well alone. If
> > > someone can tell me why my unit tests don't get run I would be greatful.
> > > Also I need a #define to let me know if the target platform is *nix or not.
> >
> > This is excellent because I noticed at the very least images should
> > be recognized and are current set at application/octet-stream (a
> > real pain for starting up a new project)
>
> Yes, it's an excellent feature, but I'm unhappy with the
> implementation. I know there was a long discussion thread about this,
> but I don't remember the outcome or consensus... what was it?
>
> I really dislike having OS-specific code in Subversion. That's the
> reason we have APR. Can't we make APR do mime-type detection? The
> Unix implementation would look for mime.types, and the Win32
> implementation could consult the registry (or however it's done.)

How about this, no matter what country, what language, or what
operating system you have *.jpg is image/jpeg, *.gif is image/gif
and *.png is image/png Since most of the binary mime-types have to
do with those maybe subversion could care along with it its own
mime-type file for these types. I could be wrong, but it would make
most happy I bet.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <dan@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
[Frodo]: "I wish it need not have happened in my time." 
[Gandalf]: "So do I, and so do all who live to see such times. 
But that is not for them to decide. All we have to decide is 
what we do with the time that is given to us.'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 29 18:37:02 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.