braid-http 1.3.10 → 1.3.11

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.
@@ -592,7 +592,7 @@ function parse_headers (input) {
592
592
  }
593
593
 
594
594
  // Extract the header string
595
- var headers_source = new TextDecoder('utf-8').decode(new Uint8Array(input.slice(start, end)))
595
+ var headers_source = input.slice(start, end).map(x => String.fromCharCode(x)).join('')
596
596
 
597
597
  // Convert "HTTP 200 OK" to a :status: 200 header
598
598
  headers_source = headers_source.replace(/^HTTP\/?\d*\.?\d* (\d\d\d).*\r?\n/, ':status: $1\r\n')
@@ -150,7 +150,7 @@ function parse_update (req, cb) {
150
150
  }
151
151
 
152
152
  // Extract the header string
153
- let headers_source = new TextDecoder('utf-8').decode(new Uint8Array(buffer.slice(s, e)))
153
+ let headers_source = buffer.slice(s, e).map(x => String.fromCharCode(x)).join('')
154
154
 
155
155
  // Now let's parse those headers.
156
156
  var headers = require('parse-headers')(headers_source)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.3.10",
3
+ "version": "1.3.11",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"