Re: [twsocket] Setting additional Header fields depending on the mimetype in th
The implementation should be delegated to a handling class which could be replaced easily by the developper. Yes, it will be a new class in the OverbyteIcsMimeUtils unit. Angus -- 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
Re: [twsocket] Setting additional Header fields depending on the mimetype in th
Persistant headers are not usefull cause only certain Mimetype need special headers And I believe this is not just a special scenario for our apps. According to Pagespeed and feedback from our users this relative simple change (Date and Expire headers) improved the response times 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. It will be editable by the application. I have noticed with my own application that images are continually downloaded on page refresh and never cached by the browser, but since they are very small I've never got around to checking the headers. Obviously I want don't want dynamic htm pages to be cached, but do want images cached. It would be best if most of this was handled in the HttpServer rather than events the application needs to process. So maybe the new MIME list could add flags or actual headers to add for differing file types? Exactly what custom headers do we need for differing MIME types? We can handle current date with a header mask. Angus -- 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
Re: [twsocket] Setting additional Header fields depending on the mimetype in th
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
Re: [twsocket] Setting additional Header fields depending on the mimetype in th
If filling from the registry, better if the list is filled dynamically when a not yet resolved file extension is requested. Except that scanning a single registry node or file, allocating memory for those nodes, and building indexes for them may be more efficient in one function. We don't want to open and load a text file each time a new type is found. I agree that memory is needed for all the MIME types, so it probably wants to be a global object shared between multiple servers, maybe with the existing code left as a default. I was only planning on checking: [HKEY_CLASSES_ROOT\MIME\Database\Content Type Not the full classes root. I was also thinking about two indexes, one of MIME types actually used, the other the hundreds or thousands that are actually registered. Angus -- 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
Re: [twsocket] Setting additional Header fields depending on the mimetype in th
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. It will be editable by the application. The implementation should be delegated to a handling class which could be replaced easily by the developper. It see a mechanism based on metaclass just like ClientClass property use. -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- 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