Ticket UUID: | 443613 | |||
Title: | new binary translation breaks pop3::send | |||
Type: | Bug | Version: | None | |
Submitter: | deery | Created on: | 2001-07-22 21:14:26 | |
Subsystem: | pop3 | Assigned To: | andreas_kupries | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2001-08-02 23:24:34 | |
Resolution: | Fixed | Closed By: | andreas_kupries | |
Closed on: | 2001-08-02 16:24:34 | |||
Description: |
Just downloaded ActiveTcl 8.3.3.2 and found pop3's new binary translation mode breaks the send proc... Connecting to some of my email accounts now hangs my email script (indefinitely?). Things worked fine with the old tcllib 0.8... I believe the problem lies in the fact that the send proc now (i.e. in the new binary mode) only appends LF- s to commands it "puts" to the POP3 server. If I'm not mistaken the official line termination sequence for POP3 is CRLF. And POP3 servers expecting this may therefore wait awhile before sending anything back... A solution might be to change the channel translation command (in ::pop3::open) into: fconfigure $chan -translation binary crlf I hope this helps. -- AH. | |||
User Comments: |
andreas_kupries added on 2001-08-02 23:23:12:
Logged In: YES user_id=75003 Patch committed. andreas_kupries added on 2001-08-02 23:19:59: File Added - 9182: tcllib.3.diff Logged In: YES user_id=75003 Added a patch to fix this problem and also [443619] and [443645]. The patch also fixes some unreported bugs introduced by the change to a faster RETR: The fast code does not EOL-translation on the incoming data and also does not unstuff .-stuffed lines. Both is done now, courtesy of [string map]. Side note: Translation "binary" _is_ required, or we will miscount the number of bytes read and try to read more than the server is sending, hanging the command and thus the calling script. andreas_kupries added on 2001-07-31 06:44:26: Logged In: YES user_id=75003 Actually I cannot see a reason for the binary on the input side either. It should be auto. I.e. lenient if the server doesn't do the EOLs correctly. I'll have to query Scott Redman about this, I guess. andreas_kupries added on 2001-07-31 06:43:09: Logged In: YES user_id=75003 Scott's answer is that MS Exchange will not work without the translation binary. Maybe this server expects LF only for commands. Is there a way to identify MS Exchange server, maybe through some string in their greeting ? andreas_kupries added on 2001-07-31 06:21:50: Logged In: YES user_id=75003 Actually I cannot see a reason for the binary on the input side either. It should be auto. I.e. lenient if the server doesn't do the EOLs correctly. I'll have to query Scott Redman about this, I guess. deery added on 2001-07-23 05:10:33: Logged In: YES user_id=278157 P.S. OK... I could have sworn I tested my fix correctly, but Wish now complains about the (obviously) missing curly braces. The workaround should read: fconfigure $chan -translation { binary crlf } -- AH. |
Attachments:
- tcllib.3.diff [download] added by andreas_kupries on 2001-08-02 23:19:59. [details]