-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 8-Mar-07, at 4:57 PM, Marc Feeley wrote:
Did you try (close-port p) ?
Actually the fundamental problem is that you are not obeying the HTTP/ 1.1 protocol. You should do something like:
(define s (open-tcp-server (list port-number: 8080 eol-encoding: 'cr- lf))) (define p (read s)) (pp (read-line p)) (display "HTTP/1.1 200 OK\n" p) (display "Content-Length: 14\n" p) (display "Content-Type: text/plain\n" p) (display "\n" p) (display "Hello World!\n" p) (force-output p)
For completeness you should check the HTTP version on the first request line and act accordingly.
This is just friendly advice... I'm not an HTTP protocol expert.
Marc