undici 7.27.0 → 7.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,6 +13,9 @@ class UnwrapController {
|
|
|
13
13
|
|
|
14
14
|
[kResume] = null
|
|
15
15
|
|
|
16
|
+
rawHeaders = null
|
|
17
|
+
rawTrailers = null
|
|
18
|
+
|
|
16
19
|
constructor (abort) {
|
|
17
20
|
this.#abort = abort
|
|
18
21
|
}
|
|
@@ -72,11 +75,13 @@ module.exports = class UnwrapHandler {
|
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
onUpgrade (statusCode, rawHeaders, socket) {
|
|
78
|
+
this.#controller.rawHeaders = rawHeaders
|
|
75
79
|
this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket)
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
onHeaders (statusCode, rawHeaders, resume, statusMessage) {
|
|
79
83
|
this.#controller[kResume] = resume
|
|
84
|
+
this.#controller.rawHeaders = rawHeaders
|
|
80
85
|
this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage)
|
|
81
86
|
return !this.#controller.paused
|
|
82
87
|
}
|
|
@@ -87,6 +92,7 @@ module.exports = class UnwrapHandler {
|
|
|
87
92
|
}
|
|
88
93
|
|
|
89
94
|
onComplete (rawTrailers) {
|
|
95
|
+
this.#controller.rawTrailers = rawTrailers
|
|
90
96
|
this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers))
|
|
91
97
|
}
|
|
92
98
|
|
package/package.json
CHANGED
package/types/dispatcher.d.ts
CHANGED
|
@@ -212,6 +212,8 @@ declare namespace Dispatcher {
|
|
|
212
212
|
get aborted(): boolean
|
|
213
213
|
get paused(): boolean
|
|
214
214
|
get reason(): Error | null
|
|
215
|
+
rawHeaders?: Buffer[] | string[] | IncomingHttpHeaders | null
|
|
216
|
+
rawTrailers?: Buffer[] | string[] | IncomingHttpHeaders | null
|
|
215
217
|
abort(reason: Error): void
|
|
216
218
|
pause(): void
|
|
217
219
|
resume(): void
|