From f5d3bb64d97e49522074bc1d4d45c7e1b8e03cb5 Mon Sep 17 00:00:00 2001
From: alexm <alexm@zephirlidar.com>
Date: Tue, 13 Aug 2013 13:13:20 +0100
Subject: [PATCH] Curl doesn't return response for IMAP Search.

Adding this line allows libcurl to return the server response when
 performing a search command via a custom request.

---
 lib/imap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/imap.c b/lib/imap.c
index 13a11d0..a8d9519 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -307,7 +307,8 @@ static bool imap_endofresp(struct connectdata *conn, char *line, size_t len,
            (strcmp(imap->custom, "STORE") ||
             !imap_matchresp(line, len, "FETCH")) &&
            strcmp(imap->custom, "SELECT") &&
-           strcmp(imap->custom, "EXAMINE")))
+           strcmp(imap->custom, "EXAMINE") &&
+           strcmp(imap->custom, "SEARCH")))
           return FALSE;
         break;
 
-- 
1.7.11.msysgit.1

