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.
- package/braid-http-client.js +1 -1
- package/braid-http-server.js +1 -1
- package/package.json +1 -1
package/braid-http-client.js
CHANGED
|
@@ -592,7 +592,7 @@ function parse_headers (input) {
|
|
|
592
592
|
}
|
|
593
593
|
|
|
594
594
|
// Extract the header string
|
|
595
|
-
var headers_source =
|
|
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')
|
package/braid-http-server.js
CHANGED
|
@@ -150,7 +150,7 @@ function parse_update (req, cb) {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
// Extract the header string
|
|
153
|
-
let headers_source =
|
|
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)
|