braid-http 1.3.56 → 1.3.57

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.
@@ -985,7 +985,8 @@ async function create_multiplexer(origin, mux_key, params, mux_params, attempt)
985
985
  signal: mux_aborter.signal,
986
986
  method: 'MULTIPLEX',
987
987
  headers: {'Multiplex-Version': multiplex_version},
988
- retry: true
988
+ retry: true,
989
+ multiplex: false
989
990
  })
990
991
  if (r.status === 409) {
991
992
  var e = await r.json()
@@ -1002,7 +1003,8 @@ async function create_multiplexer(origin, mux_key, params, mux_params, attempt)
1002
1003
  {method: 'POST',
1003
1004
  signal: mux_aborter.signal,
1004
1005
  headers: {'Multiplex-Version': multiplex_version},
1005
- retry: true})
1006
+ retry: true,
1007
+ multiplex: false})
1006
1008
  if (r.status === 409) {
1007
1009
  var e = await r.json()
1008
1010
  if (e.error === 'Multiplexer already exists')
@@ -221,6 +221,12 @@ function parse_content_range (range_string) {
221
221
  }
222
222
 
223
223
  function braidify (req, res, next) {
224
+ if (typeof req === 'function') {
225
+ var handler = req
226
+ return (req, res, next) =>
227
+ braidify(req, res, () => handler(req, res, next))
228
+ }
229
+
224
230
  // console.log('\n## Braidifying', req.method, req.url, req.headers.peer)
225
231
 
226
232
  // First, declare that we support Patches and JSON ranges.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.3.56",
3
+ "version": "1.3.57",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"