(ctx)
| 37 | |
| 38 | class HTTPHandler { |
| 39 | constructor (ctx) { |
| 40 | const { req, res, proxyName } = ctx |
| 41 | |
| 42 | this.proxyName = proxyName |
| 43 | this.req = req |
| 44 | this.res = res |
| 45 | this.resume = null |
| 46 | this.abort = null |
| 47 | this.promise = new Promise((resolve, reject) => { |
| 48 | this.callback = err => err ? reject(err) : resolve() |
| 49 | }) |
| 50 | } |
| 51 | |
| 52 | onRequestStart (controller) { |
| 53 | if (this.req.aborted) { |