bare-http1 3.5.1 → 3.5.2
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/lib/client-request.js
CHANGED
package/lib/outgoing-message.js
CHANGED
|
@@ -3,7 +3,7 @@ const errors = require('./errors')
|
|
|
3
3
|
|
|
4
4
|
module.exports = class HTTPOutgoingMessage extends Writable {
|
|
5
5
|
constructor (socket) {
|
|
6
|
-
super(
|
|
6
|
+
super()
|
|
7
7
|
|
|
8
8
|
this.socket = socket
|
|
9
9
|
this.headers = {}
|
|
@@ -42,7 +42,3 @@ module.exports = class HTTPOutgoingMessage extends Writable {
|
|
|
42
42
|
if (this.upgrade === false) this.socket.destroy()
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
function mapWritable (data) {
|
|
47
|
-
return typeof data === 'string' ? Buffer.from(data) : data
|
|
48
|
-
}
|
package/lib/server-response.js
CHANGED
|
@@ -54,7 +54,7 @@ module.exports = class HTTPServerResponse extends HTTPOutgoingMessage {
|
|
|
54
54
|
return h
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
_write (data, cb) {
|
|
57
|
+
_write (data, encoding, cb) {
|
|
58
58
|
if (this.headersSent === false) {
|
|
59
59
|
if (this._finishing) {
|
|
60
60
|
this.setHeader('Content-Length', (data.byteLength + this._writableState.buffered).toString())
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bare-http1",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"description": "Native HTTP/1 library for JavaScript",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"homepage": "https://github.com/holepunchto/bare-http1#readme",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"bare-events": "^2.0.0",
|
|
29
|
-
"bare-stream": "^
|
|
29
|
+
"bare-stream": "^2.0.0",
|
|
30
30
|
"bare-tcp": "^1.1.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|