[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Axiom-developer] Re: [Gcl-devel] Simple web server code for GCLfor

From: Page, Bill
Subject: RE: [Axiom-developer] Re: [Gcl-devel] Simple web server code for GCLfor Windows
Date: Tue, 3 May 2005 06:26:49 -0400

On Thursday, April 28, 2005 7:38 PM Mike Thomas wrote:

> Camm wrote:
> > Greetings!  Here's a quick way to get started:
> > ==================================================================
> > address@hidden:/fix/t1/camm/debian/gcl/gcl-2.6.6$ diff -u
> > ../gcl-2.6.5/o/file.d o/file.d
> > --- ../gcl-2.6.5/o/file.d   2004-05-07 21:48:58.000000000 +0000
> > +++ o/file.d        2005-04-28 16:21:33.000000000 +0000
> >
> ...
> > >(bar 8080 #'foo)
> > ==================================================================
> > Then point your browser to localhost:8080.  You should be able to get
> > directory listings and files.
> I modified the test program to print stuff out and using port 8085
> to get around IIS I was able to get a web page back with the following
> text:
>  /TMP /win32app /WINDOWS
>from the following input into my browser:
>  http://localhost:8085/dir
> So it looks like your patch works on Windows Camm to a first
> approximation - you truly are a wunderkind Camm!

Using Version_2_6_7pre compiled on Windows I am not able
to reproduce this success. I tried:


address@hidden ~/axiom--windows--1/gcl/unixport
$ saved_gcl
GCL (GNU Common Lisp)  2.6.7 CLtL1    May  3 2005 03:46:01
Source License: LGPL(gcl,gmp), GPL(unexec,bfd)
Binary License:  GPL due to GPL'ed components: (UNEXEC)
Modifications of this banner must retain notice of a compatible license
Dedicated to the memory of W. Schelter

Use (help) to get some basic information on how to use GCL.

(defun foo (s) 
  (let* ((get (read s nil 'eof)) 
         (fn (and (eq get 'get) (string-downcase (read s nil 'eof))))
         (fn (when (probe-file fn) fn)))
    (format s "HTTP/1.1 ~S~%~%" (if fn 404 500))
    (when fn
      (if (pathname-name (pathname fn))
          (with-open-file (q fn) (si::copy-stream q s))
        (dolist (l (directory fn)) (format s "~a~%" (namestring l)))))
    (close s))


(defun bar (p fn) 
  (let ((s (si::socket p :server fn))) 
        (tagbody l 
                (when (si::listen s) 
                        (let ((w (si::accept s))) 
                                (foo w))) 
                (sleep 3) 
                (go l))))

(bar 8085 #'foo)


Sits there and spins. If I go to my browser (FireFox 1.0.3) and
enter the url


after a short pause the browser returns with no error
but the page is empty.

Any ideas? Mike, could you send me your "modified test program
that prints stuff out"?

Bill Page.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]