Skip to content

Commit

Permalink
Rework AR parsing
Browse files Browse the repository at this point in the history
* Add tests.
* Use named states to make it less terribad to read.
* Track the current method in a temporary struct instead of putting
  partial results into `ar`.
* Don't parse headers if we don't care about them.
* Comprehensively dedup authentication results, instead of just within a
  single parsed header.
* Store all interesting comments.
* Clean up whitespace inside of comments.
* Fix non-terminal state conditions in the tokenizer and parser.
* Output "reason" in the correct location.
* Return ARES_RESULT_UNDEFINED when mapping result strings to values
  does not find a match; ARES_RESULT_UNKNOWN is an actual result.
* Parsed values can also need quoting and escaping on output.
* Add missing IANA registered values from https://www.iana.org/assignments/email-auth/email-auth.xhtml
  • Loading branch information
flowerysong committed Oct 15, 2024
1 parent ccd528f commit 52b28e9
Show file tree
Hide file tree
Showing 5 changed files with 568 additions and 364 deletions.
Loading

0 comments on commit 52b28e9

Please sign in to comment.