Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Add an ability to disable body parsing #478

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

azaretsky
Copy link

@azaretsky azaretsky commented May 4, 2019

Currently the on_headers_complete callback can return 0 to proceed
with the response body, 1 to skip the body, and 2 to skip the body
and stop looking for further messages, and this decision on what to do
with the body can only be made inside the on_headers_complete callback.

This PR adds an ability to alter the parser behaviour later
after on_headers_complete pauses the parser and returns 0.

To be honest I'm not very fond of the preprocessor usage or the name http_parser_continue_after_on_headers_complete.

Currently the on_headers_complete callback can return 0 to proceed
with the response body, 1 to skip the body, and 2 to skip the body
and stop looking for further messages, and this decision on what to do
with the body can only be made inside the on_headers_complete callback.

This commit adds an ability to alter the parser behaviour later
after on_headers_complete pauses the parser and returns 0.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant