On Mon, Feb 13, 2012 at 8:53 PM, Nathan Rajlich <nat...@tootallnate.net>wrote:
> We already have removeHeader(), so why not just stick with that? > > On that (rare) occasion that you want to opt-out of the Date header > then "res.removeHeader('Date')". So on any given "res" object there's > an already set "Date" that may be overridden or removed. Seems so > natural so me... > I don't think it's quite so simple, sadly. Conceptually the magic Date header would only be added after the explicit headers are sent. So removeHeader wouldn't really be removing anything. Also it's possible for a user to supply their own header -- removing *this* header is what removeHeader is for, but the result would be a server-provided magic header. And that may or may not be what you want. It requires API surface, but as Tim points out that surface should exist anyway for all the magic headers.