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

http_server: http1: always reset the parser context on pending status #9480

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

edsiper
Copy link
Member

@edsiper edsiper commented Oct 10, 2024

When Monkey parser returns MK_HTTP_PARSER_PENDING always reset the parser state:

The primary reason is that the caller may need to expand the buffer size when payloads
exceed the current buffer's capacity. In such cases, parser pointers could end up
referencing incorrect memory locations.

To prevent this, we reset the parser state, which introduces a minimal performance overhead 
in exchange for ensuring safety.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant