Skip to content
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

lenient_flags is truncated on reset #251

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

guoye-zhang
Copy link
Contributor

Newer lenient flags LENIENT_OPTIONAL_CR_BEFORE_LF LENIENT_SPACES_AFTER_CHUNK_SIZE are lost during llhttp_reset

@@ -126,7 +126,7 @@ void llhttp_reset(llhttp_t* parser) {
llhttp_type_t type = parser->type;
const llhttp_settings_t* settings = parser->settings;
void* data = parser->data;
uint8_t lenient_flags = parser->lenient_flags;
uint16_t lenient_flags = parser->lenient_flags;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it should be __typeof(parser->lenient_flags) since it could grow bigger in the future?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, but for now I wouldn't worry about it too much. It will take a lot for other 8 lenient flags to appear, I hope.

@ShogunPanda ShogunPanda merged commit e46d619 into nodejs:main Oct 3, 2023
7 checks passed
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