braid-http 0.1.7 → 0.1.8

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.
@@ -285,8 +285,9 @@ function send_version(res, data, url, peer) {
285
285
  if (Array.isArray(patches))
286
286
  patches.forEach(p => assert(typeof p.content === 'string'))
287
287
  }
288
- assert(body || patches, 'Missing body or patches')
289
- assert(!(body && patches), 'Cannot send both body and patches')
288
+ var body_exists = body || body === ''
289
+ assert(body_exists || patches, 'Missing body or patches')
290
+ assert(!(body_exists && patches), 'Cannot send both body and patches')
290
291
 
291
292
  // Write the headers or virtual headers
292
293
  for (var [header, value] of Object.entries(data)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"