Commit 14f848f
committed
⚡️ Simplify
This speeds up my (earlier) benchmarks by ~15-20% over 0.4.3, and by
22-40% over earlier versions. (FYI: I have not re-run the benchmarks
against v0.4.16 or v0.5.0-dev.)
NOTE: Previously, Net::IMAP recreated the raw original source string.
Now, it returns the decoded astring value. Although this is technically
incompatible, it should almost never make a difference: all standard
header field names are valid atoms.
Where it _does_ make a difference, it should simplify client code, by
parsing (normalizing) the result and allowing clients to ignore server
inconsistency.
This will also allow clients to simply rely on FetchData#header for
extracting the result. Without this commit, FetchData#header won't work
when servers return quoted or literal strings and the user expected
an atom.
(https://www.iana.org/assignments/message-headers/message-headers.xhtml)header-fld-name parser1 parent 34c1064 commit 14f848f
File tree
2 files changed
+6
-18
lines changed- lib/net/imap
- test/net/imap/fixtures/response_parser
2 files changed
+6
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1317 | 1317 | | |
1318 | 1318 | | |
1319 | 1319 | | |
1320 | | - | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
1324 | 1323 | | |
1325 | 1324 | | |
1326 | 1325 | | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
| 1326 | + | |
1333 | 1327 | | |
1334 | 1328 | | |
1335 | 1329 | | |
1336 | 1330 | | |
1337 | 1331 | | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
| 1332 | + | |
1345 | 1333 | | |
1346 | 1334 | | |
1347 | 1335 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
0 commit comments