-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
1,169 additions
and
680 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/node_modules/@httptoolkit/httpolyglot/dist/index.js b/node_modules/@httptoolkit/httpolyglot/dist/index.js | ||
index 935ac1b..ca44fbf 100644 | ||
--- a/node_modules/@httptoolkit/httpolyglot/dist/index.js | ||
+++ b/node_modules/@httptoolkit/httpolyglot/dist/index.js | ||
@@ -31,12 +31,9 @@ class Server extends net.Server { | ||
tlsConfig = configOrServerOrListener; | ||
requestListener = listener; | ||
} | ||
- // We bind the request listener, so 'this' always refers to us, not each subserver. | ||
- // This means 'this' is consistent (and this.close() works). | ||
- const boundListener = requestListener.bind(this); | ||
// Create subservers for each supported protocol: | ||
- this._httpServer = new http.Server(boundListener); | ||
- this._http2Server = http2.createServer({}, boundListener); | ||
+ this._httpServer = new http.Server(requestListener); | ||
+ this._http2Server = http2.createServer({}, requestListener); | ||
if (tlsServer) { | ||
// If we've been given a preconfigured TLS server, we use that directly, and | ||
// subscribe to connections there |
Oops, something went wrong.
7288108
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, an heads-up, unless you are using
"path-to-regexp": "0.1.7",
directly, you should remove this.Or bump it to a higher version like
0.1.11
if you are indeed using it directly. Test first.PS:
yarn audit
- Sadly yarn does not have a tool to fix like npm, but at least it will tell you what modules you should update.7288108
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently I do use it directly. I will try to upgrade.
0592cdf#diff-dd6867b09c3c03ee7d2b137706945be5538d6e0962927d0de886ec7f7e0ac4f5R155