Open Macil opened 11 years ago
same here. please fix that.
Seeing the same issues:
0:E
1:T
2:a
3:g
black:[30mETag[39m
blue:[34mETag[39m
bold:[1mETag[22m
Connection:keep-alive
Content-Length:99069
Content-Type:text/html
+1
For anyone seeing this issue - you might be using res.header
wrong. If you send it one argument, it's not a getter - it's expecting your one argument to be a hash of key/value pairs (not a string).
So it's interpreting res.header("ETag")
as res.header({0:'E', 1:'T', 2:'a', 3:'g'})
.
Check out the source:
function (field, val){
if (2 == arguments.length) {
if (Array.isArray(val)) val = val.map(String);
else val = String(val);
this.setHeader(field, val);
} else {
for (var key in field) {
this.set(key, field[key]);
}
}
return this;
}
+1
I don't know if my nginx config or CloudFlare is contributing to this, but I get a strange set of headers instead of an ETag header. Using node v0.8.21 and Express 3.1.0.
HTTP/1.1 200 OK Server: cloudflare-nginx Date: Mon, 04 Mar 2013 05:13:06 GMT Content-Type: application/json; charset=utf-8 0: E 1: T 2: a 3: g X-Powered-By: Express Cache-Control: private ...