Korrigiere IMAP-Ordner, MIME-Ansicht und die gemeinsamen Leser, damit große Postfächer, Notizen und verspätete Quellenantworten zuverlässig bleiben.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
34c4084a7c
commit
c29bd29f34
29 files changed
+2562
-410
No files matched your search
@@ -180,9 +180,12 @@ def test_foreign_mailbox_stays_hidden(client, db, monkeypatch):
|
||||
class HugeIMAP(FakeIMAP):
|
||||
def uid(self, command, *args):
|
||||
spec = " ".join(str(part) for part in args[1:]) if len(args) > 1 else ""
|
||||
if command == "FETCH" and "BODY.PEEK[]" in spec:
|
||||
if command == "FETCH" and "BODY.PEEK[]" in spec and "<" not in spec:
|
||||
return "OK", [(b"rfc822", b"x" * 8_000_001)]
|
||||
if "BODY.PEEK[TEXT]" in spec:
|
||||
if "BODYSTRUCTURE" in spec:
|
||||
structure = b'("TEXT" "PLAIN" ("CHARSET" "utf-8") NIL NIL "7BIT" 40 1 NIL NIL NIL NIL)'
|
||||
return "OK", [(b"body", structure)]
|
||||
if "BODY.PEEK[1]" in spec:
|
||||
return "OK", [(b"text", "Kurzer Auszug der grossen Nachricht.".encode())]
|
||||
return super().uid(command, *args)
|
||||
|
||||
|
||||
Reference in new issue
Block a user