IMAP bug fix?
[1/5] from: gchiu::compkarori::co::nz at: 13-Dec-2002 16:06
There's a bug with the IMAP protocol. If you try and open/close twice in the same session, it dies as it tries to open a non existent mailbox. Eg. first open INBOX, and close INBOX, then open INBOX again, and it actually tries to open INBOXINBOX instead .. which doesn't exist. This seems to fix it ... but perhaps others can test it out as well: In the open: function Change the line: if port/target [append path port/target] to if port/target [path: port/target] --Graham http://www.compkarori.com/cerebrus
[2/5] from: chalz:earthlink at: 12-Dec-2002 22:12
I'm talking out of my arse here, but wouldn't it be wiser to, instead, have 'close clear the path instead?
[3/5] from: gchiu:compkarori at: 13-Dec-2002 17:07
On Thu, 12 Dec 2002 22:12:43 -0500 "Charles" <[chalz--earthlink--net]> wrote:
> I'm talking out of my arse here, but wouldn't it be >wiser to, instead, have >'close clear the path instead? >
But where is 'close defined? It's not in the IMAP protocol, but a native function. --Graham http://www.compkarori.com/cerebrus
[4/5] from: gscottjones:mchsi at: 13-Dec-2002 1:57
Hi, Graham, From: "Graham Chiu"
> There's a bug with the IMAP protocol. > If you try and open/close twice in the same session, it
<<quoted lines omitted: 9>>> to > if port/target [path: port/target]
As you know, I am currently a "have not" in the REBOL SDK world. :( However, I can still poke around under the hood (bonnet) of REBOL/View. :) In View 1.2.8, the pertinent code in open in imap is: path: any [port/path ""] if port/target [append path port/target] and path is a local value, and presumably the value is not saved between calls. This leads me to suspect that the "another" bug may lie elsewhere. My "concern" with your patch is that information passed for some users through port/path would be lost. A conceivably more durable approach (albeit more wordy) may be: if not parse path compose/deep [any [(port/path)] any [(port/target)]] [append path port/target] Assuming I wrote this correctly, it should check to see if the port/target has previously been appended to path. If no one complains about your patch, then no worries. However, if problems do arise when both port/path and port/target infomation is needed, my suggestion may help. I have no imap email accounts, so I have no way to further investigate nor help debug. :) --Scott Jones
[5/5] from: gchiu:compkarori at: 13-Dec-2002 23:13
>My "concern" with your patch is that information passed >for some users >through port/path would be lost. A conceivably more >durable approach
Hi Scott, My "fix" means that you won't be able to open nested IMAP directories eg. INBOX/1/2/3/4 but I personally don't have any such nested directories. Of course a fix that fixes everything would be better :) -- Graham
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted