(trailers)
| 2998 | return this[kHandler].onRequestUpgrade?.(controller, statusCode, parsedHeaders, socket); |
| 2999 | } |
| 3000 | onResponseEnd(trailers) { |
| 3001 | this.onFinally(); |
| 3002 | assert(!this.aborted); |
| 3003 | assert(!this.completed); |
| 3004 | this.completed = true; |
| 3005 | if (channels.trailers.hasSubscribers) { |
| 3006 | channels.trailers.publish({ request: this, trailers }); |
| 3007 | } |
| 3008 | const controller = this[kController]; |
| 3009 | if (controller) { |
| 3010 | controller.rawTrailers = trailers; |
| 3011 | } |
| 3012 | const parsedTrailers = Array.isArray(trailers) ? parseHeaders(trailers) : trailers; |
| 3013 | try { |
| 3014 | return this[kHandler].onResponseEnd?.(controller, parsedTrailers); |
| 3015 | } catch (err) { |
| 3016 | this.onResponseError(err); |
| 3017 | } |
| 3018 | } |
| 3019 | onResponseError(error) { |
| 3020 | this.onFinally(); |
| 3021 | if (channels.error.hasSubscribers) { |
nothing calls this directly
no test coverage detected