braid-http 1.3.27 → 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'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.3.27",
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"