On Apr 8, 2008, at 09:45, Bjørnar Nielsen wrote:
> { We probably should use the registry to find MIME type for file
> types }
Hello:
I don't agree that the Registry should be used, because then you limit
the application to those MIME types registered at the local host. What
I propose is that a simple list of mappings between extensions and MIME
types be kept and maintained with ICS (there are many of these
available already), and that an efficient mechanism be built into the
HttpSrv to load these on start up to some sort of searchable memory
structure. I have done this in the past using a custom Red and Black
Balanced Tree, which can then be searched to find the MIME type of a
file extension (and even its transport encoding). I actually
implemented this for automatic file encodings of SMTP attachments.
By keeping it in a simple list, like Apache does, it can be easily
extended and maintained.
dZ.
--
DZ-Jay [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be