Hi,<br><br>I'm trying to write a basic webserver in Gambit Scheme. However, my efforts are being stymied at the very beginning by the fact that I can't seem to even use the most basic procedures properly...can anyone help?
<br><br>Here's what I'm trying to do now:<br>(In REPL:)<br><br>Gambit Version 4.0 beta 21<br><br>> (define s (open-tcp-server (list port-number: 8080 eol-encoding: 'cr-lf)))<br>> (define p (read s))<br><br>
Then, I go to a browser (tried in both Opera and Firefox)<br><a href="http://localhost:8080">http://localhost:8080</a><br><br>The browser goes to the page, and the `(read s)' stops blocking<br><br>Back at REPL:<br>> (read-line p) 
<br>"GET / HTTP/1.1"<br>> (display "content-type: text/plain\n" p)<br>> (display "Hello World!\n" p)<br>> (force-output p)<br><br>...And nothing happens...the page keeps trying to load, nothing is shown.  What am I doing wrong?  I tried looking at the code in the example webserver, but it didn't help much, since its much more complicated than what I'm trying to do here.  Can anyone help?
<br><br>Much obliged,<br>James<br><br>