braid-http 0.3.11 → 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.
@@ -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.version && JSON.parse('['+req.headers.version+']'),
199
- parents = req.headers.parents && JSON.parse('['+req.headers.parents+']'),
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"