You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed some unexpected behavior when parsing responses. If the response does not include a content-length header, calling llhttp_finish does not seem to reset the parser. Here's an example:
I think this is expected, but willing to be shown otherwise. Without a content-length, the parser has no way to know the length of the response. The point of llhttp_finish is not to reset the parser, it's to figure out the final state of the current parse, possibly based on a call to on_message_complete. Once you are done with the parser, to reuse it you need to call llhttp_reset to put it back in its initial state, preserving any flags, callbacks, & cookies you've set on it.
I noticed some unexpected behavior when parsing responses. If the response does not include a
content-length
header, callingllhttp_finish
does not seem to reset the parser. Here's an example:Output:
I'd expect to see this:
The text was updated successfully, but these errors were encountered: