-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🥅 Validate
response-tagged
in the parser
The `response-tagged` parser now enforces `resp-cond-state`, raising `InvalidResponseError` for any invalid status conditions. It is also refactored to the new parser style. An explicit method for `tag` is added, which is parsed similarly to `astring_chars` and `atom`. ```abnf response-tagged = tag SP resp-cond-state CRLF resp-cond-state = ("OK" / "NO" / "BAD") SP resp-text ; Status condition tag = 1*<any ASTRING-CHAR except "+"> ``` Currently, any exception raised by the parser will abruptly drop the connection. In the future, if the response handler thread is made more robust against recoverable errors, `InvalidResponseError` should be considered non-recoverable. (There is a test that covers this already).
- Loading branch information
Showing
1 changed file
with
44 additions
and
15 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