diff --git a/packages/fast-check/src/arbitrary/_internals/helpers/InvalidSubdomainLabelFiIter.ts b/packages/fast-check/src/arbitrary/_internals/helpers/InvalidSubdomainLabelFiIter.ts index 78c71fff..902a5a58 100644 --- a/packages/fast-check/src/arbitrary/_internals/helpers/InvalidSubdomainLabelFiIter.ts +++ b/packages/fast-check/src/arbitrary/_internals/helpers/InvalidSubdomainLabelFiIter.ts @@ -8,7 +8,10 @@ export function filterInvalidSubdomainLabel(subdomainLabel: string): boolean { // - ::= | // - ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case // - ::= any one of the ten digits 0 through 9 - // If we strictly follow RFC 1034, 9gag would be an invalid domain. Support for such domain has been added by .... + // If we strictly follow RFC 1034, 9gag would be an invalid domain. + // Support for such domain has been added by RFC 1123 section 2.1. + // It allows a hostname to start with a letter or a digit. + // https://www.rfc-editor.org/rfc/rfc1123.html#section-2.1 if (subdomainLabel.length > 63) { return false; // invalid, it seems that this restriction has been relaxed in modern web browsers }