(data)
| 278 | }; |
| 279 | |
| 280 | const respond = (data) => { |
| 281 | headers["Content-Length"] = |
| 282 | "string" === typeof data ? Buffer.byteLength(data) : data.length; |
| 283 | this.res.writeHead(200, this.headers(this.req, headers)); |
| 284 | this.res.end(data); |
| 285 | callback(); |
| 286 | }; |
| 287 | |
| 288 | if (!this.httpCompression || !options.compress) { |
| 289 | respond(data); |