_http_outgoing.js错误


  1)_http_outgoing.js:314  

_http_outgoing.js:314
throw new TypeError(
^

TypeError: Header name must be a valid HTTP Token ["Content-Type"]
at storeHeader (_http_outgoing.js:314:11)
at ServerResponse.OutgoingMessage._storeHeader (_http_outgoing.js:228:9)
at ServerResponse.writeHead (_http_server.js:221:8)
at Server.<anonymous> (E:\nodejs\http_modules.js:5:6)
at emitTwo (events.js:106:13)
at Server.emit (events.js:191:7)
at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:546:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)

出现这个错误,检查一下Content-Type有没有拼写性低级错误。

 

2)_http_outgoing.js:351

http_server版本低,升级http_server的命令行指令: npm update -g http_server


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM