For what it's worth, here is what I did in Luvit and it's worked well so far.

There are several automatic headers. I understand that sometimes
people don't want the magic headers and so I put in a trivial switch
to disable any of them:
https://github.com/luvit/luvit/blob/master/lib/http.lua#L110-114

    Response.auto_date = true
    Response.auto_server = "Luvit"
    Response.auto_chunked_encoding = true
    Response.auto_content_length = true
    Response.auto_content_type = "text/html"

(Response is also the prototype for response instances)  So if a user
wants to not send date headers in their app, they can either have a
middleware that sets this property to false for each and every
request.  Or they can disable it globally by changing the prototype.

Node could do something like this as well.  It would be good for all
the magic headers in node to be configurable.  Yes people can use
http_parser directly, but it's an awful lot of code to just disable a
single magic property.




On Wed, Feb 8, 2012 at 8:31 AM, Nuno Job <nunojobpi...@gmail.com> wrote:
> This is going to make http-signing unpredictable and harder to code. You can
> sign whatever you want but signing date is a default practice.
>
> I would rather have control over the header.
>

Reply via email to