Debugging my code with node-inspector I found the code below.
The problem is in line:
var key = name.toLowerCase();
What is the value added of lowercase headers in outgoing messages?
Regards
Cristian
File: http.js
Line 639 to 653
OutgoingMessage.prototype.setHeader = function(name, value) {
if (arguments.length < 2) {
throw new Error('`name` and `value` are required for setHeader().');
}
if (this._header) {
throw new Error('Can\'t set headers after they are sent.');
}
var key = name.toLowerCase();
this._headers = this._headers || {};
this._headerNames = this._headerNames || {};
this._headers[key] = value;
this._headerNames[key] = name;
};
On Sun, Dec 2, 2012 at 12:04 AM, Ben Noordhuis <[email protected]> wrote:
> On Sun, Dec 2, 2012 at 3:53 AM, Mikeal Rogers <[email protected]>
> wrote:
> > headers core sets, like transfer-encoding and host will be lowercase.
>
> Wrong again. Auto-added headers like Authorization, Date,
> Content-Length, Transfer-Encoding, etc. are all properly capitalized.
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en