httpplease.js icon indicating copy to clipboard operation
httpplease.js copied to clipboard

Server-side tests fail with `[email protected]`

Open yuanqing opened this issue 10 years ago • 2 comments

This is the diff between 1.7 and 1.8: https://github.com/driverdan/node-XMLHttpRequest/compare/5c773316b0b711eccce5e7c65f0855a2bb666d75...86ff70effb6dd529b34650242b9e3b1f0b8b6e86.

The problem appears to stem from this single line: https://github.com/driverdan/node-XMLHttpRequest/compare/5c773316b0b711eccce5e7c65f0855a2bb666d75...86ff70effb6dd529b34650242b9e3b1f0b8b6e86#diff-5f1f2828afc85dc32e37fabdd36a976cR559

If we do a GET, say, the onabort event always fires, and the done callback is called. err is falsy and res.text is empty.

Not sure what can be done here; is this a bug to be resolved upstream?

yuanqing avatar Oct 12 '15 16:10 yuanqing

Yes, xmlhttprequest 1.8 pretty much broke httpplease as a server-side http client. Perhaps using a version of '*' wasn't wise although something like "^1.7.0" wouldn't have helped.

As a workaround, try "xmlhttprequest": "~1.7.0” in your package.json.

johnomalley avatar Oct 23 '15 17:10 johnomalley

Arg yeah. If it's not working like in the browser, it sounds like a bug upstream. /:

matthewwithanm avatar May 27 '16 08:05 matthewwithanm