I have a situation where I have some code running locally that has to communicate with another device on the same network. To do so, I'm making a straight http request to http://192.168.0.1, a request that returns a bunch of data in the response body. The problem I'm having is that the device itself returns invalid headers:
$ curl -IS 'http://192.168.0.1/getdeviceinfo/info.bin' HTTP/1.1 200 OK Date: Wed, 02 Dec 2015 16:42:45 GMT Server: nostradamus 1.9.5 Connection: close Etag: Aug 28 2015, 07:57:20 Transfer-Encoding: chunked HTTP/1.0 200 OK Content-Type: text/html Note the duplicate "HTTP/1.0 200 OK" header. Other tools (e.g. Chrome, curl, python) that I've tried at least handle the bad headers "gracefully", but node simply dies with a HPE_INVALID_HEADER_TOKEN error. It's not incorrect, of course, but I need a workaround. My code will be installed on hundreds of thousands of desktops talking to hundreds of thousands of these devices. We simply can't update all of the devices to fix the headers. All I care about is the response body. Is there any way to get node to be more lenient and ignore the bad header? Do I have any options here? Any thoughts would be much appreciated. I'm completely stuck here. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/aaf7bce8-9a5c-43ba-9563-52ee561ec5fc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
