_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