[Python-bugs-list] [ python-Bugs-406705 ] imaplib search() quoting search criteria

noreply@sourceforge.net noreply@sourceforge.net
Sun, 18 Mar 2001 12:01:53 -0800


Bugs item #406705, was updated on 2001-03-07 07:05
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=406705&group_id=5470

Category: Python Library
Group: None
Status: Open
Priority: 5
Submitted By: Christian Kissner (b7kich)
Assigned to: Skip Montanaro (montanaro)
Summary: imaplib search() quoting search criteria

Initial Comment:
Imaplib IMAP4.search() contains a bug in criteria
handling: when
sending a single word criterium it gets written to the
stream well: 
	M.search(None, 'ALL')
produces:
	GINH16 SEARCH
ALL                                         

But a criterium with a white space will be quoted:

	M.search(None,'TEXT Hello')
produces in the tcp stream:
	GINH17 SEARCH "TEXT Hello"

which gets rejected because quotes are only allowed
around
the string, not the criterium:
	GINH17 SEARCH TEXT "Hello"



----------------------------------------------------------------------

>Comment By: Skip Montanaro (montanaro)
Date: 2001-03-18 12:01

Message:
Logged In: YES 
user_id=44345

This doesn't look like a bug to me.  Looks like the search
call is incorrect.  I think it should be called as

    M.search(None, "TEXT", "Hello")

I've never used the imaplib stuff before, however.  I'd
welcome some input from someone who has.

Skip


----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-03-17 21:49

Message:
Logged In: YES 
user_id=31435

Assigned to Skip at random.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=406705&group_id=5470