Skip to content

improve codebase, fix QDTEXT lookup table #682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Aug 5, 2025
Merged

improve codebase, fix QDTEXT lookup table #682

merged 16 commits into from
Aug 5, 2025

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Jun 1, 2025

Actually started as improve codebase branch. It seems that there is mistake in the lookup table for QDTEXT, which is in main called QUOTED_STRING.

export const QUOTED_STRING: CharList = [ '\t', ' ' ];
for (let i = 0x21; i <= 0xff; i++) {
  if (i !== 0x22 && i !== 0x5c) { // All characters in ASCII except \ and "
    QUOTED_STRING.push(i);
  }
}

The generated Lookup Table in main contains also 0x7F, which is not a valid char of QDTEXT.

https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.4

I guess, we actually can extract all the lookup table code into a separate file, because we dont need that lookup data in nodejs or undici, in contrast to error code and stuff.

@Uzlopak Uzlopak requested review from ShogunPanda and indutny June 1, 2025 12:05
@Uzlopak Uzlopak changed the title improve codebase, fix QDTEXT lookup table?! improve codebase, fix QDTEXT lookup table Jun 1, 2025
@Uzlopak Uzlopak merged commit a1ec671 into main Aug 5, 2025
10 checks passed
@Uzlopak Uzlopak deleted the better-types branch August 5, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants