braid-http 0.3.10 → 0.3.12
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-server.js +4 -3
- package/package.json +1 -1
package/braid-http-server.js
CHANGED
|
@@ -195,8 +195,8 @@ function braidify (req, res, next) {
|
|
|
195
195
|
res.setHeader('Range-Request-Allow-Units', 'json')
|
|
196
196
|
|
|
197
197
|
// Extract braid info from headers
|
|
198
|
-
var version = req.headers
|
|
199
|
-
parents = req.headers
|
|
198
|
+
var version = ('version' in req.headers) && JSON.parse('['+req.headers.version+']'),
|
|
199
|
+
parents = ('parents' in req.headers) && JSON.parse('['+req.headers.parents+']'),
|
|
200
200
|
peer = req.headers['peer'],
|
|
201
201
|
url = req.url.substr(1)
|
|
202
202
|
|
|
@@ -234,7 +234,8 @@ function braidify (req, res, next) {
|
|
|
234
234
|
res.isSubscription = true
|
|
235
235
|
|
|
236
236
|
// Let's disable the timeouts (if it exists)
|
|
237
|
-
|
|
237
|
+
if (req.socket.server)
|
|
238
|
+
req.socket.server.timeout = 0.0
|
|
238
239
|
|
|
239
240
|
// We have a subscription!
|
|
240
241
|
res.statusCode = 209
|