[Web-SIG] Other kinds of environment variables
mnot at mnot.net
Fri Aug 27 05:44:45 CEST 2004
On Aug 26, 2004, at 5:03 PM, Ian Bicking wrote:
>> * cache validation - does the server handle If-Modified-Since and
>> If-None-Match requests appropriately (e.g., with a 304)?
> I would almost certainly expect this to be false. There may be some
> WSGI servers that have an extended notion of the application, so they
> can look at things like the modification date. But those are likely
> to be uncommon -- more likely only applications will know the
> necessary information.
Apache CGI does it; i.e., if you set a Last-Modified header, it'll
automagically handle validation for you.
This is pretty old, but gives an indication of what Web servers do in
this and other regards:
> When I think of middleware, I can think of many things like this. In
> most cases, I'd add a key, and if the key wasn't present I'd know it
> was false. But it can be odd. Say I have a middleware that catches
> exceptions, because that's my one example at the moment. If it is
> present, it would be nice if other applications didn't catch
> exceptions, and let them propagate all the way up. So, the
> application looks for
> environ.get('ianb_middleware.exception_catcher')? That's weird,
> because someone else comes along and makes their own exception catcher
> that works like mine; what key do they use? It would be nice if we
> used the same key.
> But then, at this point I might suggest we use
> 'webapp0.exception_catcher', leading up to a Web App standard that
> defines the meaning for a bunch more keys ('webapp1.exception_catcher'
> once we agree on a standard).
> Anyway, that's my theory on how this might go.
I can totally see this stuff happening on a more ad hoc basis. We did
similar things at Akamai; i.e., putting together a
dynamically-configured pipeline of handlers to implement HTTP
functionality, as well as content transforms. Very useful and very
Mark Nottingham http://www.mnot.net/
More information about the Web-SIG