On 13-12-2011 08:31, Angus Robertson - Magenta Systems Ltd wrote:
I'm just about to change to HttpServer MIME handling again, to use a
look-up list read from the Windows classes registry or a text file) when
the server starts, to replace the current hard coded MIME list.

If filling from the registry, better if the list is filled dynamically when a not yet resolved file extension is requested. Enumerating all these keys is time consuming, making the server sluggish at start. And using memory resources, for MIME types that are not going to be requested, is a waste. But could be a good idea to pre-fill it with the more common ones (e.g. use the current hard-coded to pre-fill it). When a not in the list is requested, try from the registry. if found, cache it in the list. If not found, cache the default, application/octet-stream, one, so you don't loose time searching for it again, the next time it is requested.
--
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

Reply via email to