Skip to content

Commit fd08e00

Browse files
committed
refactor: rename sanatizeHeaderName to sanitize
1 parent 17537e5 commit fd08e00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function impl (req, resOrSocket, headOrNil, {
8787
req.headers[HTTP2_HEADER_VIA] &&
8888
req.headers[HTTP2_HEADER_VIA]
8989
.split(',')
90-
.some(name => sanatizeHeaderName(name).endsWith(proxyName.toLowerCase()))
90+
.some(name => sanitize(name).endsWith(proxyName.toLowerCase()))
9191
) {
9292
throw createError('loop detected', null, 508)
9393
}
@@ -300,7 +300,7 @@ function setupHeaders (headers) {
300300

301301
if (connection && connection !== 'close') {
302302
for (const name of connection.split(',')) {
303-
delete headers[sanatizeHeaderName(name)]
303+
delete headers[sanitize(name)]
304304
}
305305
}
306306

@@ -316,7 +316,7 @@ function setupHeaders (headers) {
316316
return headers
317317
}
318318

319-
function sanatizeHeaderName (name) {
319+
function sanitize (name) {
320320
return name.trim().toLowerCase()
321321
}
322322

0 commit comments

Comments
 (0)