braid-http 0.3.7 → 0.3.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.
@@ -355,7 +355,7 @@ function send_update(res, data, url, peer) {
355
355
 
356
356
  // Write the patches or body
357
357
  if (typeof body === 'string') {
358
- set_header('Content-Length', body.length)
358
+ set_header('Content-Length', (new TextEncoder().encode(body)).length)
359
359
  write_body(body)
360
360
  } else
361
361
  res.write(generate_patches(res, patches))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"