Artifact
757d172baec59eb20dd5c5d61d4855a1efc3ec5c:
Attachment "pop3.diff" to
ticket [473656ffff]
added by
edesio
2001-10-22 20:13:24.
--- pop3.tcl Fri Jun 22 12:29:18 2001
+++ pop3.ecs Mon Oct 22 10:57:18 2001
@@ -173,13 +173,23 @@
set sizeStr [::pop3::send $chan "RETR $index"]
scan $sizeStr {%d %s} size dummy
-
- set msgBuffer [read $chan $size]
+
+ set msgBuffer ""
+ while {[gets $chan line] >= 0} {
+ if {[string equal $line ".\r"]} {
+ break
+ }
+ regsub -- {^\.} $line {} line
+ append msgBuffer $line "\n"
+ }
+
+# set msgBuffer [read $chan $size]
+# puts "msgBuffer($size :: [string length $msgBuffer]): msgBuffer"
# get the terminating "."
# sometimes the gets returns nothing,
# need to get the real terminating "."
- while {[gets $chan] != ".\r"} {}
+# while {[gets $chan] != ".\r"} {}
lappend result $msgBuffer
}