http-parser icon indicating copy to clipboard operation
http-parser copied to clipboard

Add an ability to disable body parsing

Open azaretsky opened this issue 6 years ago • 0 comments

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.

azaretsky avatar May 04 '19 16:05 azaretsky