提交 53b31da1 编写于 作者: J Joshua Peek

Fix headers response

上级 c568f1af
......@@ -42,13 +42,12 @@ var routes = {
res.end('not json {');
},
'/headers': function(res) {
var headers = [
'Date: Mon, 13 Oct 2014 21:02:27 GMT',
'Content-Type: text/html; charset=utf-8'
].join('\r\n')
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(headers + '\r\n');
res.writeHead(200, {
'Content-Type': 'text/plain',
'Date': 'Mon, 13 Oct 2014 21:02:27 GMT',
'Content-Type': 'text/html; charset=utf-8'
});
res.end();
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册