[Prev][Next][Index][Thread]
tcp and netscape
I vaguely remember seeing something like this on the CL-HTTP
mailing list. Hopefully, John Mallery or someone else who
reads that list will remember it and save me the trouble of
looking through my archives.
-Bill
>Posted-Date: Tue, 6 Aug 1996 15:51:16 -0700 (PDT)
>X-Sender: mrg@sunburn.stanford.edu
>Mime-Version: 1.0
>Date: Tue, 6 Aug 1996 15:55:48 +0100
>To: bug-mcl@digitool.com
>From: genesereth@cs.stanford.edu (Michael R. Genesereth)
>Subject: tcp and netscape
>Cc: genesereth@cs.stanford.edu, wdavies@cs.stanford.edu
>
>Folks,
>
>I am writing a special purpose web server in mcl3.0p2 on my mac 540c
>running system 7.5. Unfortunately, I have encountered an interaction
>problem with tcp and netscape that I think is mcl's fault. When I write
>plenty of characters to the open stream being read by netscape, everything
>is fine. However, if I write too few characters, I get an error from all
>versions of netscape. The error says ``Document contains no data''. Yes I
>do finish-output. The same code works okay in other lisps.
>
>I have managed to boil the problem down to a reasonably small form. Here
>is the code.
>
>load mactcp from library folder
>
>(defun echo (s)
> (format s "Hello~%")
> (format s "and~%")
> (format s "Goodbye~%~%")
> (force-output s)
> (close s))
>
>(defun tcp-loop (port)
> (let ((s (open-tcp-stream nil port :commandtimeout 86400000)))
> (do () ((stream-listen s) (echo s)))))
>
>(tcp-loop 4000)
>
>Now go to netscape and open location http://<yourhostname>:4000/. This should
>produce a short message from lisp. However, netscape puts up an errr
>message. If you use the same code but push out a lot of characters,
>everything is fine.
>Help!
>
>mrg
>
>************************************************************************
>Michael R. Genesereth genesereth@cs.stanford.edu
>Computer Science Department 415-723-0324
>Stanford University Fax: 415-725-7411
>Stanford CA 94305 http://logic.stanford.edu/people/genesereth.html
>************************************************************************
>