suyashkumar/smart-lights

Some machines throw net::ERR_EMPTY_RESPONSE on app load

suyashkumar opened this issue · 1 comments

Some machines throw a net::ERR_EMPTY_RESPONSE on the initial GET requests to the home auto server. This is not browser specific as the latest version of Chome on another mac with OS 10.11 does not throw this error (weird, may have to do with axios lib mismatches)

xhr.js:158 GET http://home.suyash.io/api/send/suyash/lightsStatus net::ERR_EMPTY_RESPONSE(anonymous function) @ xhr.js:158e.exports @ xhr.js:12
xhr.js:158 GET http://home.suyash.io/api/send/suyash/undefined net::ERR_EMPTY_RESPONSE(anonymous function) @ xhr.js:158e.exports @ xhr.js:12

See my comments here:
axios/axios#191

Turns out this is likely caused by setting a request header to null. Setting to empty string in these cases solves the problem.