我可以在第5行的这个例子中添加“\ n”吗? 如果我能,hahaha会出现在http响应体中吗?
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {
'Content-Length': body.length,
'Location' : 'http://www.aaa.com\nhahaha',
'Content-Type': 'text/plain' });
res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
感谢您的帮助
答案 0 :(得分:-1)
节点将过滤\ n
因此,使用此代码将无法注入..