]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Make UID FETCH return the UID as the first field to fix problems with bad
authorTimo Sirainen <tss@iki.fi>
Tue, 11 Mar 2008 13:02:31 +0000 (15:02 +0200)
committerTimo Sirainen <tss@iki.fi>
Tue, 11 Mar 2008 13:02:31 +0000 (15:02 +0200)
IMAP clients.

--HG--
branch : HEAD

src/imap/cmd-fetch.c

index e4fa9787f99812b0d5f1d831742fe622872aad92..02deb87eb7f00c1fe4e85c9185e59adca97a35db 100644 (file)
@@ -22,6 +22,10 @@ fetch_parse_args(struct imap_fetch_context *ctx, const struct imap_arg *arg)
 {
        const char *str, *const *macro;
 
+       if (ctx->cmd->uid) {
+               if (!imap_fetch_init_handler(ctx, "UID", &arg))
+                       return FALSE;
+       }
        if (arg->type == IMAP_ARG_ATOM) {
                str = t_str_ucase(IMAP_ARG_STR(arg));
                arg++;
@@ -59,12 +63,6 @@ fetch_parse_args(struct imap_fetch_context *ctx, const struct imap_arg *arg)
                        return FALSE;
                }
        }
-
-       if (ctx->cmd->uid) {
-               if (!imap_fetch_init_handler(ctx, "UID", &arg))
-                       return FALSE;
-       }
-
        return TRUE;
 }