scsh-users
[Top] [All Lists]

Scsh 0.4.4 and the scheme httpd.

To: scsh-bugs@martigny.ai.mit.edu
Subject: Scsh 0.4.4 and the scheme httpd.
From: Humberto Ortiz Zuazaga <humberto@momo.uthscsa.edu>
Date: Tue, 05 Nov 1996 13:50:37 -0600
I just installed scsh 0.4.4 on two linux boxes, and now I can't get the
httpd in net.tar.gz to work anymore.  I get the following:

aleph:~/src/scheme/net$ ./server.scm

Error: exception
       (symbol->string "http-reply")

This same setup worked in the last release v0.4(.2?).

Are there patches to net.tar.gz or to scsh for this?  Is there anything
else I need to do.

I've attached a copy of my server.scm, in case I'm doing something dumb.

--
#!/usr/local/bin/scsh \
-lm modules.scm -lm toothless.scm -dm -o http-top -e top -s
!#

;;; Scheme Underground Web Server -*- Scheme -*-
;;; Olin Shivers

;;; To compile as a heap-image:
;;;     ,open http-top
;;;     (dump-scsh-program top "server")
;;; then insert a #! trigger.

(define-structure http-top (export top)
  (open httpd-core
        cgi-server-package
        httpd-basic-handlers
        seval-handler-package
        scsh
        scheme)
  (begin

    ;; Kitche-sink path handler.

    (define ph
      (alist-path-dispatcher
       `(("h" . ,(home-dir-handler "public_html"))
         ("seval" . ,seval-handler)
         ("cgi-bin" . ,(cgi-handler "/var/httpd/cgi-bin")))
       (tilde-home-dir-handler "public_html"
                               (rooted-file-handler "/var/httpd/htdocs"))))



    ;; Crank up a server on port 8001, first resetting our identity to
    ;; user "nobody". Initialise the request-invariant part of the CGI
    ;; env before starting.

    (define (top args)
      (display "We be jammin, now.\n") (force-output)
      (cond ((zero? (user-uid))
             (set-gid -2)  ; Should be (set-uid (->uid "nobody")) 
             (set-uid -2)))     ; but NeXTSTEP loses. 
      (initialise-request-invariant-cgi-env)
      (httpd ph 8001 "/var/httpd"))))

<Prev in Thread] Current Thread [Next in Thread>