MCPcopy
hub / github.com/nodejs/undici / onRequestUpgrade

Method onRequestUpgrade

lib/core/request.js:371–383  ·  view source on GitHub ↗
(statusCode, headers, socket)

Source from the content-addressed store, hash-verified

369 }
370
371 onRequestUpgrade (statusCode, headers, socket) {
372 assert(!this.aborted)
373 assert(!this.completed)
374
375 const controller = this[kController]
376 if (controller) {
377 controller.rawHeaders = headers
378 }
379
380 const parsedHeaders = Array.isArray(headers) ? parseHeaders(headers) : headers
381
382 return this[kHandler].onRequestUpgrade?.(controller, statusCode, parsedHeaders, socket)
383 }
384
385 onResponseEnd (trailers) {
386 this.onFinally()

Callers

nothing calls this directly

Calls 2

parseHeadersFunction · 0.85
onRequestUpgradeMethod · 0.65

Tested by

no test coverage detected