Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix response for the command that is too long
Before the patch, if a client sent too long command, server would respond by BAD_FORMAT, followed by UNKNOWN_COMMAND. This resulted in desync between client and server. This patch adds another state STATE_WANT_ENDLINE, whose purpose is to drop command line until the EOL is found. Client can send as big command as he want and server will be able to skip it and return only one error message: BAD_FORMAT. Some STATE_* constants were renamed to improve readability. Fixes #337
- Loading branch information
Showing
3 changed files
with
77 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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