Firstly, thanks for your work on this project! π
Today I used patch-package to patch stream-http@3.2.0 for the project I'm working on.
Problem started to arise with empty response body with latest version of Firefox (I think).
Here is the diff that solved my problem:
diff --git a/node_modules/stream-http/lib/response.js b/node_modules/stream-http/lib/response.js
index 91d1900..aeab6b3 100644
--- a/node_modules/stream-http/lib/response.js
+++ b/node_modules/stream-http/lib/response.js
@@ -75,6 +75,12 @@ var IncomingMessage = exports.IncomingMessage = function (xhr, response, mode, r
return
} catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this
}
+
+ if (!response.body) {
+ resetTimers(true);
+ self.push(null)
+ return
+ }
// fallback for when writableStream or pipeTo aren't available
var reader = response.body.getReader()
function read () {
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
stream-http@3.2.0
for the project I'm working on.Problem started to arise with empty response body with latest version of Firefox (I think).
Here is the diff that solved my problem:
Update of: https://github.com/jhiesey/stream-http/pull/110
This issue body was partially generated by patch-package.