From 27f6c5a832ffd98822544d1c4a85eabe32070e81 Mon Sep 17 00:00:00 2001 From: interp Date: Wed, 22 Jan 2003 12:53:46 +0000 Subject: [PATCH] + complete renaming SERVLET->SURFLET + adjust to recent changes in RFC822 (surflets.scm, packages.scm) --- scheme/httpd/surflets/load-surflet-server.scm | 4 ++-- scheme/httpd/surflets/packages.scm | 7 +++---- scheme/httpd/surflets/start-surflet-server | 8 ++++---- scheme/httpd/surflets/surflets.scm | 2 ++ scheme/httpd/surflets/web-server/root/htdocs/index.html | 6 +++--- scheme/httpd/surflets/web-server/root/surflets/admin.scm | 2 +- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/scheme/httpd/surflets/load-surflet-server.scm b/scheme/httpd/surflets/load-surflet-server.scm index 6f0868b..dc78fe0 100644 --- a/scheme/httpd/surflets/load-surflet-server.scm +++ b/scheme/httpd/surflets/load-surflet-server.scm @@ -20,12 +20,12 @@ (in 'scsh `(run (string-append (or (getenv "SUNETHOME") ,*ASSUMED-SUNET-HOME*) - "/httpd/servlets/packages.scm")))) + "/httpd/surflets/packages.scm")))) (define *SURFLET-SERVER* (in 'scsh `(run (string-append (or (getenv "SUNETHOME") ,*ASSUMED-SUNET-HOME*) - "/httpd/servlets/start-servlet-server")))) + "/httpd/surflets/start-surflet-server")))) (config `(load ,*SUNET-PACKAGE*)) (config `(load ,*SSAX-PACKAGE*)) (config `(load ,*SURFLET-PACKAGE*)) diff --git a/scheme/httpd/surflets/packages.scm b/scheme/httpd/surflets/packages.scm index 4c9db7a..0df1699 100644 --- a/scheme/httpd/surflets/packages.scm +++ b/scheme/httpd/surflets/packages.scm @@ -135,7 +135,7 @@ handle scheme ) - (files servlet-handler)) + (files surflet-handler)) (define-interface surflets-interface @@ -190,7 +190,6 @@ parse-html-forms sxml-to-html ; SXML->HTML srfi-1 ; FILTER - (subset rfc822 (get-header)) (subset srfi-13 (string-index)) sxml-tree-trans url @@ -201,7 +200,7 @@ handle-fatal-error scsh scheme) - (files servlets)) + (files surflets)) (define-interface surflet-interface (export main)) ; MAIN gets one parameter, the REQUEST @@ -286,4 +285,4 @@ (subset srfi-1 (zip filter find make-list)) handle-fatal-error ) - (files simple-servlet-api)) + (files simple-surflet-api)) diff --git a/scheme/httpd/surflets/start-surflet-server b/scheme/httpd/surflets/start-surflet-server index 7a5d218..bd29113 100755 --- a/scheme/httpd/surflets/start-surflet-server +++ b/scheme/httpd/surflets/start-surflet-server @@ -6,7 +6,7 @@ fullpath=`which $0` sunet=${SUNETHOME:-`dirname $fullpath`/../..} ssax=${SSAXPATH:-$sunet/SSAX} # path to SSAX -exec scsh -lm $sunet/packages.scm -lm $ssax/lib/packages.scm -lm $sunet/httpd/servlets/packages.scm -dm -o surflet-server -e main -s "$0" "$@" +exec scsh -lm $sunet/packages.scm -lm $ssax/lib/packages.scm -lm $sunet/httpd/surflets/packages.scm -dm -o surflet-server -e main -s "$0" "$@" !# (define-structure surflet-server @@ -29,13 +29,13 @@ exec scsh -lm $sunet/packages.scm -lm $ssax/lib/packages.scm -lm $sunet/httpd/se (define (usage) (format #f -"Usage: start-servlet-server [-h htdocs-dir] [-s surflet-dir] [-i images-dir] +"Usage: start-surflet-server [-h htdocs-dir] [-s surflet-dir] [-i images-dir] [-p port] [-l log-file-name] [-r requests] [--help] with htdocs-dir directory of html files (default: ./web-server/root/htdocs) - surflet-dir directory of SUrflet files (default: ./web-server/root/servlets) + surflet-dir directory of SUrflet files (default: ./web-server/root/surflets) images-dir directory of images files (default: ./web-server/root/img) port port server is listening to (default: 8080) log-file-name directory where to store the logfile in CLF @@ -63,7 +63,7 @@ exec scsh -lm $sunet/packages.scm -lm $ssax/lib/packages.scm -lm $sunet/httpd/se (set! port "8088") (set! log-file-name "./web-server/httpd.log") (set! root "./web-server/root") - (set! surflet-dir "./web-server/root/servlets") + (set! surflet-dir "./web-server/root/surflets") (set! simultaneous-requests "5")) (define (normalize-options) diff --git a/scheme/httpd/surflets/surflets.scm b/scheme/httpd/surflets/surflets.scm index 3c7d87d..ac66b58 100644 --- a/scheme/httpd/surflets/surflets.scm +++ b/scheme/httpd/surflets/surflets.scm @@ -87,6 +87,8 @@ (loop cache)))))))) (release-lock *cache-lock*) result)) + +(define get-header assoc) ;; Will be needed when we handle POST requests. (define (get-content-length headers) diff --git a/scheme/httpd/surflets/web-server/root/htdocs/index.html b/scheme/httpd/surflets/web-server/root/htdocs/index.html index 84796f8..5dc2978 100644 --- a/scheme/httpd/surflets/web-server/root/htdocs/index.html +++ b/scheme/httpd/surflets/web-server/root/htdocs/index.html @@ -10,13 +10,13 @@
  • News
  • Adding (raw HTML version)
  • Adding (SUrflets version)
  • -
  • Adding (input-field +
  • Adding (input-field version)
  • Adding (simple SUrflet version)
  • Simple Calculator
  • Byte Input Widget
  • -
  • Simple SUrflet
  • +
  • Simple SUrflet
  • Spaceship builder
  • SUrflet Administration
  • @@ -28,7 +28,7 @@
    -Last modified: Sun Jan 19 17:34:31 CET 2003 +Last modified: Wed Jan 22 12:58:31 MET 2003 diff --git a/scheme/httpd/surflets/web-server/root/surflets/admin.scm b/scheme/httpd/surflets/web-server/root/surflets/admin.scm index e6dd4a2..085481d 100644 --- a/scheme/httpd/surflets/web-server/root/surflets/admin.scm +++ b/scheme/httpd/surflets/web-server/root/surflets/admin.scm @@ -13,7 +13,7 @@ (p (ul (li (URL "admin-handler.scm" "Set handler options...")) - (li (URL "admin-servlets.scm" "SUrflets...")) + (li (URL "admin-surflets.scm" "SUrflets...")) (li (URL "admin-profiling.scm" "Profiling...")))) (hr) (p (URL "/" "Return to main menu.")))))