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

Undocumented behaviour with llhttp_execute() + HPE_PAUSED #585

Open
madMAx43v3r opened this issue Feb 1, 2025 · 0 comments
Open

Undocumented behaviour with llhttp_execute() + HPE_PAUSED #585

madMAx43v3r opened this issue Feb 1, 2025 · 0 comments

Comments

@madMAx43v3r
Copy link

The readme should be updated to explain what happens when llhttp_execute() returns HPE_PAUSED.

From what I can see, we need to get the input position where it stopped via error_pos (badly named variable, since pausing is not a real error) or via llhttp_get_error_pos() and then resume with that as the next input pointer, while updating the length accordingly.

For example I wrongly assumed it will store the current position and resume correctly when passing the same input again. Or you might assume it stores the unprocessed data internally somehow.

Should also mention that if HPE_OK is returned it is guaranteed that the entire input has been consumed.

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

No branches or pull requests

1 participant