http.get Parse Error, code: 'HPE_UNEXPECTED_CONTENT_LENGTH'

后端 未结 2 1390
误落风尘
误落风尘 2021-01-14 11:22

I have a simple node script to process some data from my home automation API. Everything worked fine till last Node update. Now, with Node version 4.3.0 or 5.6.0, the http m

2条回答
  •  -上瘾入骨i
    2021-01-14 11:35

    As said in the previous answer this is node design as per HTTP standards. i got this issue when I was trying to access REST-API (a content disposition call) in my DEV server from my Angular App running in my local machine. API was not adding these headers Content-Length and Transfer Encoding. The issue resolved when the app was also deployed to Dev server (Angular App and REST API in same server).

    From what I understood, Remove one header if both are being added in API or Try deploying app in Server.

    This is a useful link on this issue - https://github.com/request/request/issues/2091

提交回复
热议问题