braid-blob 0.0.9 → 0.0.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.
Files changed (2) hide show
  1. package/index.js +6 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -31,8 +31,13 @@ braid_blob.serve = async (req, res, options = {}) => {
31
31
 
32
32
  if (req.method === 'GET') {
33
33
  // Handle GET request for binary files
34
- res.setHeader('Current-Version', our_v != null ? `"${our_v}"` : '')
35
34
 
35
+ // Set Version header;
36
+ // but if this is a subscription,
37
+ // then we set Current-Version instead
38
+ res.setHeader((req.subscribe ? 'Current-' : '') + 'Version',
39
+ our_v != null ? `"${our_v}"` : '')
40
+
36
41
  if (!req.subscribe)
37
42
  return res.end(our_v != null ?
38
43
  await fs.promises.readFile(filename) : '')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-blob",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "Library for collaborative blobs over http using braid.",
5
5
  "author": "Braid Working Group",
6
6
  "repository": "braid-org/braid-blob",