Commit 89413ff
committed
🥅 Update unknown numeric response-data handling
Unhandled _simple_ numeric responses, which contain only the numeric
prefix and the response name, will now simply return the number as the
response data.
`UnparsedData` was introduced by #200. That struct has been renamed to
`UnparsedNumericResponseData`, which represents data for unhandled
response types with a numeric prefix. This prefix _is_ parsed but the
additional response data is not.
A simpler `UnparsedData` struct now represents data for unknown response
types _or_ for unknown extensions to response types without a
well-defined extension grammar. It is currently only used by
`response_data__unhandled`, but future PRs will use it anywhere we can
safely extract an unparsed string from the larger response: e.g unknown
response code data.1 parent 7b75be9 commit 89413ff
File tree
3 files changed
+47
-11
lines changed- lib/net/imap
- test/net/imap/fixtures/response_parser
3 files changed
+47
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
70 | 91 | | |
71 | 92 | | |
72 | 93 | | |
73 | 94 | | |
74 | 95 | | |
75 | 96 | | |
76 | | - | |
77 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
78 | 100 | | |
79 | 101 | | |
80 | 102 | | |
81 | | - | |
| 103 | + | |
82 | 104 | | |
83 | 105 | | |
84 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
605 | 609 | | |
606 | 610 | | |
607 | 611 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments