| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -159,17 +159,19 @@ node.http.createServerRequest = function (connection) { | |||
| 159 | 159 | // | | |
| 160 | 160 | // v | |
| 161 | 161 | ||
| 162 | - createClientResponse = function (connection) { | ||
| 162 | + createClientResponse = function (client) { | ||
| 163 | 163 | var res = new node.EventEmitter; | |
| 164 | 164 | ||
| 165 | - res.connection = connection; | ||
| 165 | + res.client = client; | ||
| 166 | + res.connection = client; | ||
| 167 | + | ||
| 166 | 168 | res.statusCode = null; | |
| 167 | 169 | res.httpVersion = null; | |
| 168 | 170 | res.headers = []; | |
| 169 | 171 | res.last_was_value = false; // used internally XXX remove me | |
| 170 | 172 | ||
| 171 | 173 | res.setBodyEncoding = function (enc) { | |
| 172 | - connection.setEncoding(enc); | ||
| 174 | + client.setEncoding(enc); | ||
| 173 | 175 | }; | |
| 174 | 176 | ||
| 175 | 177 | return res; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -861,6 +861,9 @@ After emitted no other events will be emitted on the response. | |||
| 861 | 861 | Set the encoding for the response body. Either +"utf8"+ or +"raw"+. | |
| 862 | 862 | Defaults to raw. | |
| 863 | 863 | ||
| 864 | + +response.client+ :: | ||
| 865 | + A reference to the +node.http.Client+ that this response belongs to. | ||
| 866 | + | ||
| 864 | 867 | ||
| 865 | 868 | ||
| 866 | 869 | === TCP | |
| Back | FazBrowse Home | New Git URL |
0 commit comments