Skip to content

Commit

Permalink
imap: Add parenthesis to FETCH SNIPPET (FUZZY text) response
Browse files Browse the repository at this point in the history
Otherwise it violates the RFC 3501 text about FETCH responses.
  • Loading branch information
sirainen committed Feb 16, 2018
1 parent 1b38fca commit 1fc112d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/imap/imap-fetch-body.c
Expand Up @@ -626,13 +626,14 @@ fetch_snippet(struct imap_fetch_context *ctx, struct mail *mail,
return 1;
}

str = t_strdup_printf(" SNIPPET FUZZY {%"PRIuSIZE_T"}\r\n", strlen(snippet));
str = t_strdup_printf(" SNIPPET (FUZZY {%"PRIuSIZE_T"}\r\n", strlen(snippet));
if (ctx->state.cur_first) {
str++;
ctx->state.cur_first = FALSE;
}
o_stream_nsend_str(ctx->client->output, str);
o_stream_nsend_str(ctx->client->output, snippet);
o_stream_nsend_str(ctx->client->output, ")");

return 1;
}
Expand Down

0 comments on commit 1fc112d

Please sign in to comment.