diff options
author | 2023-08-17 14:57:43 -0700 | |
---|---|---|
committer | 2023-08-17 14:57:43 -0700 | |
commit | f74585ff01c9be796fb5bb678f8cbf80544f44eb (patch) | |
tree | 3b650a02d326c94e589d4bf5b0d7ccf191c4e431 /src/js/node/http.ts | |
parent | b2f8ef4dff8c4fa0a12f3d11520bb0609bbaecde (diff) | |
download | bun-f74585ff01c9be796fb5bb678f8cbf80544f44eb.tar.gz bun-f74585ff01c9be796fb5bb678f8cbf80544f44eb.tar.zst bun-f74585ff01c9be796fb5bb678f8cbf80544f44eb.zip |
Allow IncomingRequest.req to be overwritten. (#4154)
* Allow IncomingRequest.req to be overwritten.
* add test
* fix test
* yoo
Diffstat (limited to 'src/js/node/http.ts')
-rw-r--r-- | src/js/node/http.ts | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/js/node/http.ts b/src/js/node/http.ts index 4d56a34cf..db09acda3 100644 --- a/src/js/node/http.ts +++ b/src/js/node/http.ts @@ -607,7 +607,7 @@ class IncomingMessage extends Readable { this.#fakeSocket = socket; this.url = url.pathname + url.search; - this.#nodeReq = nodeReq; + this.#nodeReq = this.req = nodeReq; assignHeaders(this, req); } @@ -624,10 +624,6 @@ class IncomingMessage extends Readable { #type; #nodeReq; - get req() { - return this.#nodeReq; - } - _construct(callback) { // TODO: streaming if (this.#type === "response" || this.#noBody) { |