braid-http 0.3.8 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/braid-http-client.js +1 -1
- package/braid-http-server.js +2 -2
- package/package.json +3 -3
package/braid-http-client.js
CHANGED
|
@@ -131,7 +131,7 @@ if (is_nodejs) {
|
|
|
131
131
|
normal_fetch = require('node-fetch')
|
|
132
132
|
AbortController = require('abort-controller')
|
|
133
133
|
Headers = normal_fetch.Headers
|
|
134
|
-
var to_whatwg_stream = require('
|
|
134
|
+
var to_whatwg_stream = require('web-streams-node').toWebReadableStream
|
|
135
135
|
} else {
|
|
136
136
|
// Web Browser
|
|
137
137
|
normal_fetch = window.fetch
|
package/braid-http-server.js
CHANGED
|
@@ -233,8 +233,8 @@ function braidify (req, res, next) {
|
|
|
233
233
|
|
|
234
234
|
res.isSubscription = true
|
|
235
235
|
|
|
236
|
-
// Let's disable the timeouts
|
|
237
|
-
req.socket.server.timeout = 0.0
|
|
236
|
+
// Let's disable the timeouts (if it exists)
|
|
237
|
+
req.socket.server && req.socket.server.timeout = 0.0
|
|
238
238
|
|
|
239
239
|
// We have a subscription!
|
|
240
240
|
res.statusCode = 209
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braid-http",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
4
4
|
"description": "An implementation of Braid-HTTP for Node.js and Browsers",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node test/server.js"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"abort-controller": "^3.0.0",
|
|
29
29
|
"node-fetch": "^2.6.1",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
30
|
+
"parse-headers": "^2.0.3",
|
|
31
|
+
"web-streams-node": "^0.4.0"
|
|
32
32
|
}
|
|
33
33
|
}
|