Skip to content

Commit 896def4

Browse files
committed
fix: correct RFC reference in comments
RFC 9110 obsoletes RFC 7230 and has more relaxed rules. The strict validation follows RFC 7230 rules, not RFC 9110.
1 parent 41ebd2a commit 896def4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/_http_common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ function checkIsHttpToken(val) {
256256
return true;
257257
}
258258

259-
// Strict header value regex per RFC 7230/9110:
259+
// Strict header value regex per RFC 7230:
260260
// field-value = *( field-content / obs-fold )
261261
// field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
262262
// field-vchar = VCHAR / obs-text
@@ -272,7 +272,7 @@ const lenientHeaderCharRegex = /[\x00\x0a\x0d]|[^\x00-\xff]/;
272272

273273
/**
274274
* True if val contains an invalid header value character.
275-
* By default uses strict validation per RFC 7230/9110.
275+
* By default uses strict validation per RFC 7230.
276276
* When lenient=true, uses relaxed validation per Fetch spec.
277277
* @param {string} val
278278
* @param {boolean} [lenient=false] - Use lenient validation (Fetch spec rules)

test/parallel/test-http-invalidheaderfield2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('_http_common');
6060

6161

6262
// ============================================================================
63-
// Strict header value validation (default) - per RFC 7230/9110
63+
// Strict header value validation (default) - per RFC 7230
6464
// Rejects control characters (0x00-0x1f except HTAB) and DEL (0x7f)
6565
// ============================================================================
6666

0 commit comments

Comments
 (0)