Repository navigation
Fix json reader stall on http body trailer. - #968
Merged
Merged
Conversation
Contributor
|
fix confirmed working |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A completed json body reader returned zero bytes consumed without an error when beast re-fed the remainder of a Content-Length body, so
http::async_readre-posted the same bytes forever. The thread never idled, pinning a pool thread per request and blockingthreadpool::joinon shutdown. The body is read before dispatch, so this is reachable before authorization with anyapplication/jsonbody whose trailing whitespace arrives in a separate read (Fulcrum sends\r\ninside Content-Length), or with any trailing non-whitespace.jsonrpc_reader_stallwhen re-fed, otherwise the start of the next stream message.extra_data.is_json_whitespacemoved to json_body.hpp and shared.Tests added for both readers. Syntax-checked locally only; not run.