fix: default charset=None in search/uid_search#127
Open
mickey-mikey wants to merge 2 commits intoiroco-co:mainfrom
Open
fix: default charset=None in search/uid_search#127mickey-mikey wants to merge 2 commits intoiroco-co:mainfrom
mickey-mikey wants to merge 2 commits intoiroco-co:mainfrom
Conversation
…jection Yahoo's IMAP server does not advertise UTF8=ACCEPT or UTF8=ONLY in its CAPABILITY response and rejects CHARSET utf-8 in SEARCH commands with BAD [CLIENTBUG]. Per RFC 3501 §6.4.4, CHARSET is optional in SEARCH commands, so defaulting to None (omitting it) is more correct and compatible. Fixes iroco-co#126 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
87d7ad7 to
c4a8ce1
Compare
Poetry 2.x dropped Python 3.9 support, breaking CI for all PRs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
charsetparameter from'utf-8'toNoneinsearch(),uid_search(), and the protocol-levelsearch()methodcharset=None, theCHARSETkeyword is omitted from SEARCH commands, which is valid per RFC 3501 §6.4.4test_search_default_charset_is_noneverifying both default (None) and explicit charset behaviour forsearch()anduid_search()Problem
Yahoo's IMAP server does not support UTF-8 in SEARCH commands and rejects
CHARSET utf-8withBAD [CLIENTBUG]. Sincesearch()anduid_search()defaultcharset='utf-8', all search operations fail against Yahoo out of the box.Fix
Default
charset=Noneso SEARCH commands are sent without CHARSET by default. Callers with a specific need for charset encoding should pass it explicitly (e.g.charset='utf-8').Breaking change
CHARSET is optional per RFC 3501 §6.4.4 — the correct default is
None. Callers relying on the implicitCHARSET utf-8being sent will need to passcharset='utf-8'explicitly.Fixes #126