@nxtedition/nxt-undici 7.3.13 → 7.3.14
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.
package/lib/interceptor/log.js
CHANGED
package/lib/interceptor/proxy.js
CHANGED
|
@@ -105,7 +105,9 @@ function reduceHeaders({ headers, proxyName, httpVersion, socket }, fn, acc) {
|
|
|
105
105
|
socket.remoteAddress && `for=${printIp(socket.remoteAddress, socket.remotePort)}`,
|
|
106
106
|
`proto=${socket.encrypted ? 'https' : 'http'}`,
|
|
107
107
|
forwardedHost && `host="${forwardedHost}"`,
|
|
108
|
-
]
|
|
108
|
+
]
|
|
109
|
+
.filter(Boolean)
|
|
110
|
+
.join(';'),
|
|
109
111
|
)
|
|
110
112
|
} else if (forwarded) {
|
|
111
113
|
// The forwarded header should not be included in response.
|
|
@@ -176,7 +176,6 @@ class Handler extends DecoratorHandler {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
if (this.#statusCode < 400) {
|
|
179
|
-
this.#retryCount = 0
|
|
180
179
|
return super.onData(chunk)
|
|
181
180
|
}
|
|
182
181
|
|
|
@@ -194,7 +193,6 @@ class Handler extends DecoratorHandler {
|
|
|
194
193
|
this.#trailers = trailers
|
|
195
194
|
|
|
196
195
|
if (this.#statusCode < 400) {
|
|
197
|
-
this.#retryCount = 0
|
|
198
196
|
return super.onComplete(trailers)
|
|
199
197
|
}
|
|
200
198
|
|
package/lib/utils.js
CHANGED
|
@@ -59,8 +59,8 @@ export function parseContentRange(range) {
|
|
|
59
59
|
return m
|
|
60
60
|
? {
|
|
61
61
|
start: parseInt(m[1], 10),
|
|
62
|
-
end: m[2] ? parseInt(m[2]) + 1 : null,
|
|
63
|
-
size: m[3] === '*' ? null : parseInt(m[3]),
|
|
62
|
+
end: m[2] ? parseInt(m[2], 10) + 1 : null,
|
|
63
|
+
size: m[3] === '*' ? null : parseInt(m[3], 10),
|
|
64
64
|
}
|
|
65
65
|
: null
|
|
66
66
|
}
|
|
@@ -83,8 +83,8 @@ export function parseRangeHeader(range) {
|
|
|
83
83
|
const m = range.match(/^bytes=(\d+)-(\d+)?$/)
|
|
84
84
|
return m
|
|
85
85
|
? {
|
|
86
|
-
start: parseInt(m[1]),
|
|
87
|
-
end: m[2] ? parseInt(m[2]) + 1 : null,
|
|
86
|
+
start: parseInt(m[1], 10),
|
|
87
|
+
end: m[2] ? parseInt(m[2], 10) + 1 : null,
|
|
88
88
|
size: null,
|
|
89
89
|
}
|
|
90
90
|
: null
|