Hello.
I did the process of remote attestation in a NodeJS application. When I tried to do a post to IAS, with the main NodeJS modules for request, I received this error:
error: { Error: Parse Error
at TLSSocket.socketOnData (_http_client.js:411:20)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at TLSSocket.Readable.push (_stream_readable.js:136:10)
at TLSWrap.onread (net.js:559:20) bytesParsed: 195, code: 'HPE_UNEXPECTED_CONTENT_LENGTH' }
Searching about this problem, I found out that this is related to a malformed response from IAS, as stated in:
-http://stackoverflow.com/questions/35525715/http-get-parse-error-code-hpe-unexpected-content-length
-https://github.com/nodejs/node/issues/5754
-https://github.com/nodejs/node/issues/6517
As a workaround, I had to use a module based on curl. Can anyone please explain me if this format of the response from IAS could be "fixed" and avoid future problems with other developers?
Thank you.
Link Copied
Dalton, I will try to recreate this error of HPE_UNEXPECTED_CONTENT_LENGTH on my development environment to understand this issue better on when and how it can occur. A status update will be followed.
For more complete information about compiler optimizations, see our Optimization Notice.