Skip to content

clear request/response parser state before starting#4

Closed
mghhimu wants to merge 2 commits intonekipelov:masterfrom
mghhimu:master
Closed

clear request/response parser state before starting#4
mghhimu wants to merge 2 commits intonekipelov:masterfrom
mghhimu:master

Conversation

@mghhimu
Copy link

@mghhimu mghhimu commented Aug 23, 2020

Currently, the parser retains the parser state, so no matter how many times you call consume, it will always start with the last state of the first call

@nekipelov
Copy link
Owner

Yep. This is because we receive data in chunks over the network. One request is processed by multiple calls consume. To clear the state, create a new parser instance for the next request.

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