Skip to content

Undocumented behaviour with llhttp_execute() + HPE_PAUSED #585

@madMAx43v3r

Description

@madMAx43v3r

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions