[plt-scheme] Possible nntp-unit.ss bug [patch]

From: MJ Ray (markj at cloaked.freeserve.co.uk)
Date: Thu Jul 11 11:57:34 EDT 2002

I was having problems with nntp article reads occasionally failing on me. 
After some detective work, I think the following patch corrects the problem.
I think it was caused by looking for an leading full stop (which terminates
the response) before checking for an escaped leading full stop.

Hope this is still relevant.  My MzScheme claims:
; mzscheme -v
Welcome to MzScheme version 200alpha20, Copyright (c) 1995-2002 PLT

which I know is a little out of date.  I'll upgrade soon, I promise!  The
v200 installation on a nearby system appears to have the bug in it still. 
I've hacked my nntp-unit about, so you may need to increase patch's fuzz.

Thanks,

--- /usr/lib/plt/collects/net/nntp-unit.ss      Wed Jun 19 09:48:23 2002
+++ /usr/lib/plt/collects/net/nntp-unit.ss      Thu Jul 11 16:47:52 2002
@@ -149,10 +149,10 @@
                  ((signal-error make-premature-close
                                 "port prematurely closed during multi-line response")
                   communicator))
-                ((string=? l ".")
-                 '())
                 ((string=? l "..")
                  (cons "." (loop)))
+                ((string=? l ".")
+                 '())
                 (else
                  (cons l (loop)))))))))


-- 
MJR ,----------------------------------------------------
    | Q. Do you need a net-based application developing, 
    |    or advice and training about web technology?
    | A. I suggest you try http://www.luminas.co.uk/




Posted on the users mailing list.