Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The history goes like this: Commit 0b1ca85 fixed a bug. Back then we still used the do-while loop thanks to `request::set_buffer` requiring us to call `request::next` right after (but only if code was equals to `error_insufficient_data`). Boost.Http's commit https://github.com/BoostGSoC14/boost.http/commit/ b573efe21b27b415f45362ca00c3189600799713 changed that. This commit added the following code to the end of `set_buffer`: if (code_ == token::code::error_insufficient_data) next(); So we no longer need to manually call `next` after `set_buffer`. However, this changed the parsing loop condition from: priv->parser.code() != http::token::code::end_of_message to: priv->parser.code() != http::token::code::error_insufficient_data && priv->parser.code() != http::token::code::end_of_message Once we moved away from the do-while construct in the parsing loop code, back in commit 17fbe06, we kept the new loop condition, even thou now the correct condition would be: priv->parser.code() != http::token::code::error_insufficient_data Less than 48 hours later I realized the mistake and made commit 1d7a943, but kept the spurious `parser.next()` code. The extra `parser.next()` wasn't harmful, but it is unneeded code that will add a cognitive overhead making code harder to understand. This commit removes this line.
- Loading branch information