mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
in imap4rev1 search, always send an untagged search response, also without matches
required by rfc. i noticed an example doing that in the condstore/qresync rfc.
This commit is contained in:
parent
bca33c0364
commit
bc62aae0e6
2 changed files with 5 additions and 4 deletions
|
@ -128,6 +128,11 @@ func (c *conn) cmdxSearch(isUID bool, tag, cmd string, p *parser) {
|
|||
})
|
||||
|
||||
if eargs == nil {
|
||||
// In IMAP4rev1, an untagged SEARCH response is required. ../rfc/3501:2728
|
||||
if len(uids) == 0 {
|
||||
c.bwritelinef("* SEARCH")
|
||||
}
|
||||
|
||||
// Old-style SEARCH response. We must spell out each number. So we may be splitting
|
||||
// into multiple responses. ../rfc/9051:6809 ../rfc/3501:4833
|
||||
for len(uids) > 0 {
|
||||
|
|
|
@ -36,10 +36,6 @@ this is html.
|
|||
func (tc *testconn) xsearch(nums ...uint32) {
|
||||
tc.t.Helper()
|
||||
|
||||
if len(nums) == 0 {
|
||||
tc.xnountagged()
|
||||
return
|
||||
}
|
||||
tc.xuntagged(imapclient.UntaggedSearch(nums))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue