记录nodejs的writeHead

使用response.writeHead()时,如果第二个参数的值使用错误的字符时,会使整个页面被镶嵌在<pre></pre>中被传输过去。

例:

response.writeHead(200, {'Content-Type': `text/x.html`});

猜你喜欢

转载自www.cnblogs.com/breezyNone/p/10630323.html