You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried making a sync request via jQuery through node-XMLHttpRequest. It threw a not-all-that-obvious error. I traced through the code, and found it was due to jQuery calling xhr.getAllResponseHeaders(). It appears that for the sync case node-xhr doesn't support getAllResponseHeaders. Specifically the current impl goes to the response object to get the headers, but the response object is defined because in the sync case there isn't one.
I've just issued a PR that provides a work-around for this, and also for the "getAllResponseHeaders" part of #47 (Cannot read property 'headers' of undefined in XMLHttpRequest.js).
Activity
driverdan commentedon Jun 1, 2012
Thanks. You're right, looks like sync requests don't set the response headers. I will work on this for the next release.
Trap for missing response/response headers in getAllResponseHeaders (…
jjbenson commentedon Feb 23, 2015
I've just issued a PR that provides a work-around for this, and also for the "getAllResponseHeaders" part of #47 (Cannot read property 'headers' of undefined in XMLHttpRequest.js).