I'm not sure, generally speaking, If it's handler specific, then
probably it won't go into Env, since other handler won't be able to
put information into it, e.g. happstack-server has no knowledge of
remote_host.
If it's commonly used then it might go into http, otherwise hackHeader
/ aka custom.
> Also, since the following are frequently enough used, perhaps we should
> consider including them as fields in Env? They are:
> Content-type
> Content-length
> Cookie
I prefer them to stay inside http headers, since getting / setting
header values can be achieved by helper method, while leaving the
interface small. Besides they are just standard http
headers , moving them to Env will be a bit confusing.
> Finally, should we try to standardize capitalization somehow? I'm going to
> follow the headers list on Wikipedia
> (http://en.wikipedia.org/wiki/List_of_HTTP_headers) for now, but I'm not
> sure if all browsers agree to send Content-Type instead of Content-type. We
> *could* force everything to be lowercase, or even provide an http lookup
> function that uses a case-insensitive match.
Converting non-standard header names to standard names inside a
handler is fare enough.
Cheers,
--
jinjing
I'm not sure, generally speaking, If it's handler specific, then
> REMOTE_HOST, however, is neither an HTTP variable or included in Hack. This
> seems like something we should add; I know I'm going to want to do logging
> as Middleware, and I would like the logging to work for all handlers, not
> just the CGI/FastCGI ones.
probably it won't go into Env, since other handler won't be able to
put information into it, e.g. happstack-server has no knowledge of
remote_host.
If it's commonly used then it might go into http, otherwise hackHeader
/ aka custom.
I prefer them to stay inside http headers, since getting / setting
> Also, since the following are frequently enough used, perhaps we should
> consider including them as fields in Env? They are:
> Content-type
> Content-length
> Cookie
header values can be achieved by helper method, while leaving the
interface small. Besides they are just standard http
headers , moving them to Env will be a bit confusing.
Converting non-standard header names to standard names inside a
> Finally, should we try to standardize capitalization somehow? I'm going to
> follow the headers list on Wikipedia
> (http://en.wikipedia.org/wiki/List_of_HTTP_headers) for now, but I'm not
> sure if all browsers agree to send Content-Type instead of Content-type. We
> *could* force everything to be lowercase, or even provide an http lookup
> function that uses a case-insensitive match.
handler is fare enough.
--
jinjing