可以在节点 js 中的 http 标头中添加新行吗?



我可以像第5行中的此示例那样添加""吗?万一我可以,哈哈哈会出现在http响应正文中吗?

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {
  'Content-Length': body.length,
  'Location' : 'http://www.aaa.comnhahaha',
  'Content-Type': 'text/plain' });
  res.end('Hello Worldn');
}).listen(1337, "127.0.0.1");

感谢您的帮助

节点将过滤

因此,因此不会使用此代码进行注入..

最新更新