Commit 8c61a66
committed
refactor: accept generic <error>/<responsedescription> without server fingerprints
_parse_response hardcoded Stalwart's "No resources found" responsedescription
text and purelymail's {https://purelymail.com}does-not-exist error child to
recognise 404s in multistatus replies. Both <error> and <responsedescription>
are optional, server-defined children of <response> per RFC 4918, so the
content assertions were never warranted and adding the next server's 404 shape
meant editing the generic parser.
Accept either element generically. A genuinely novel tag still hits
error.weirdness(). The check_404 debug guard is now None-safe since a server
may legally send these elements without a response-level status.
Addresses §6.1 of docs/design/FULL_CODE_REVIEW_2026-06.md.
prompt: for point 6.1 in the code review document, perhaps the solution is to
fix so that any <error> or <responsedescription> is accepted, without any
hardcoded server fingerprints (though this will fail once a third server throws
in a <errortext> or something like that)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
AI Prompts:
claude-sonnet-4-6: PR #686. Please look through it and describe what it does.
claude-sonnet-4-6: for point 6.1 in the code review document (docs/design/FULL_CODE_REVIEW_2026-06.md), perhaps the solutoin is to fix so that any <error> or <repsonsedescription> is accepted, without any hardcoded server fingerprints. (though this will fail once a third server throws in a <errortext> or something like that)1 parent aea46ac commit 8c61a66
3 files changed
Lines changed: 74 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
504 | 498 | | |
505 | 499 | | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
510 | 503 | | |
511 | 504 | | |
512 | | - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
513 | 509 | | |
514 | 510 | | |
515 | 511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
461 | 461 | | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
462 | 471 | | |
463 | 472 | | |
464 | 473 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
211 | 258 | | |
212 | 259 | | |
213 | 260 | | |
| |||
0 commit comments