imaplib.IMAP4: Bug in implementation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Oliver Kurz

    imaplib.IMAP4: Bug in implementation

    Hello,

    I just discovered a "bug" in the imaplib.

    I want to send the following command to the imap-server and I was suprisedto get a error. :-)

    The command:

    UID STORE 2349672398 +FLAGS (\SEEN)

    IMAP4 makes from this command:

    UID STORE 2323423233 "+FLAGS(\SE EN)"

    This is not valid (http://community.roxen.com/developer.../rfc3501..html)

    So ... is there a fix for this problem? Or have someone a workaround für this problem?

    I call the uid like this

    uid("STORE",uid ,"+FLAGS(\SEEN) ")

    --
    Oliver Kurz


  • Max M

    #2
    Re: imaplib.IMAP4: Bug in implementation

    Oliver Kurz wrote:
    [color=blue]
    > I call the uid like this
    >
    > uid("STORE",uid ,"+FLAGS(\SEEN) ")[/color]


    Are you shure you don't mean::

    uid("STORE",uid ,"+FLAGS(\\SEEN )")

    You are trying to create a non-existent special character, escaping the
    s in your example.

    I am not quite shure how Python reacts to that.


    regards Max M

    Comment

    • Donn Cave

      #3
      Re: imaplib.IMAP4: Bug in implementation

      In article <mailman.77.107 9525205.742.pyt hon-list@python.org >,
      "Oliver Kurz" <olku@web.de> wrote:
      [color=blue]
      > I call the uid like this
      >
      > uid("STORE",uid ,"+FLAGS(\SEEN) ")[/color]

      Have you tried uid("STORE", uid, "+FLAGS", "(\SEEN)")?

      Donn Cave, donn@u.washingt on.edu

      Comment

      • Peter Hansen

        #4
        Python behaviour with unrecognized string escapes (was Re: imaplib.IMAP4:B ug in implementation)

        Max M wrote:[color=blue]
        > Oliver Kurz wrote:
        >[color=green]
        > > I call the uid like this
        > >
        > > uid("STORE",uid ,"+FLAGS(\SEEN) ")[/color]
        >
        >
        > Are you shure you don't mean::
        >
        > uid("STORE",uid ,"+FLAGS(\\SEEN )")
        >
        > You are trying to create a non-existent special character, escaping the
        > s in your example.
        >
        > I am not quite shure how Python reacts to that.[/color]

        Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)][color=blue][color=green][color=darkred]
        >>> '\s'[/color][/color][/color]
        '\\s'[color=blue][color=green][color=darkred]
        >>> '\\s'[/color][/color][/color]
        '\\s'

        Seems that it if it doesn't recognize the escape, the effect is the same
        as if you had escaped the escape character in the first place...

        -Peter

        Comment

        Working...