Skip to content

Commit 67dd85f

Browse files
committed
Make request and response objects backward compatible
1 parent a5f7b8e commit 67dd85f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/request.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ Request.prototype._createReqRes = function () {
159159
self.end();
160160
});
161161

162+
// NOTE: Backward compatibility
163+
this._req.data = this.dataStream;
164+
this._req.cgiParams = this.params;
165+
166+
this._res.stdout = this;
167+
this._res.stderr = this.errorStream;
168+
162169
return { req: this._req, res: this._res };
163170
}
164171

0 commit comments

Comments
 (0)