braid-http 1.3.26 → 1.3.28

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.
@@ -965,6 +965,11 @@ async function multiplex_fetch(url, params) {
965
965
  throw new Error('multiplexer not yet connected')
966
966
  }
967
967
 
968
+ // if the response says it's ok,
969
+ // but it's is not a multiplexed response,
970
+ // fall back to as if it was a normal fetch
971
+ if (res.ok && res.status !== 293) return res
972
+
968
973
  if (res.status !== 293) throw new Error('Could not establish multiplexed stream ' + params.headers.get('multiplexer') + ', got status: ' + res.status)
969
974
 
970
975
  if (res.headers.get('Multiplex-Version') !== '0.0.1') throw new Error('Could not establish multiplexed stream ' + params.headers.get('multiplexer') + ', got unknown version: ' + res.headers.get('Multiplex-Version'))
@@ -473,7 +473,7 @@ function braidify (req, res, next) {
473
473
  // We have a subscription!
474
474
  res.statusCode = 209
475
475
  res.setHeader("subscribe", req.headers.subscribe ?? 'true')
476
- res.setHeader('cache-control', 'no-cache, no-transform')
476
+ res.setHeader('cache-control', 'no-cache, no-transform, no-store')
477
477
 
478
478
 
479
479
  // Note: I used to explicitly disable transfer-encoding chunked
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.3.26",
3
+ "version": "1.3.28",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"