diff --git a/scheme/httpd/cgi-server.scm b/scheme/httpd/cgi-server.scm index 8b2f30e..5c6bbdb 100644 --- a/scheme/httpd/cgi-server.scm +++ b/scheme/httpd/cgi-server.scm @@ -81,7 +81,7 @@ (let ((request-invariant-cgi-env ; environment variables that never change `(("PATH" . ,(and (getenv "PATH") cgi-bin-path)) - ("SERVER_SOFTWARE" . ,server/version) + ("SERVER_SOFTWARE" . ,sunet-version-identifier) ("SERVER_NAME" . ,(host-info:name (host-info (system-name)))) ("GATEWAY_INTERFACE" . "CGI/1.1")))) (lambda (path req) diff --git a/scheme/httpd/constants.scm b/scheme/httpd/constants.scm deleted file mode 100644 index 5053f20..0000000 --- a/scheme/httpd/constants.scm +++ /dev/null @@ -1,4 +0,0 @@ -;;; Constants -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(define server/version "Scheme-Underground/1.0") -(define server/protocol "HTTP/1.0") diff --git a/scheme/httpd/core.scm b/scheme/httpd/core.scm index fdae955..eb191f8 100644 --- a/scheme/httpd/core.scm +++ b/scheme/httpd/core.scm @@ -18,6 +18,8 @@ ;;; The server top-level. PATH-HANDLER is the top-level request path handler -- ;;; the procedure that actually deals with the request. +(define server/protocol "HTTP/1.0") + (define (httpd options) (let ((port (httpd-options-port options)) (root-dir (httpd-options-root-directory options)) @@ -272,7 +274,7 @@ (write-crlf port) (send-http-header-fields - (list (cons 'server server/version) + (list (cons 'server sunet-version-identifier) (cons 'content-type (response-mime response)) (cons 'date (time->http-date-string (response-seconds response)))) port) diff --git a/scheme/packages.scm b/scheme/packages.scm index babc0a6..c937a71 100644 --- a/scheme/packages.scm +++ b/scheme/packages.scm @@ -316,10 +316,6 @@ v0.9-request? version->string)) -(define-interface httpd-constants-interface - (export server/version - server/protocol)) - (define-interface httpd-responses-interface (export make-response response? response-code @@ -406,6 +402,11 @@ ;; Structures +(define-structure sunet-version (export sunet-version-identifier) + (open scheme) + (begin + (define sunet-version-identifier 2.0))) + ;; Net protocols and formats (define-structure parse-html-forms parse-html-forms-interface @@ -693,8 +694,9 @@ httpd-error httpd-logging httpd-request - httpd-constants httpd-responses + + sunet-version scheme) (files (httpd core))) @@ -743,10 +745,6 @@ scheme) (files (httpd request))) -(define-structure httpd-constants httpd-constants-interface - (open scheme) - (files (httpd constants))) - (define-structure httpd-responses httpd-responses-interface (open scheme srfi-9 @@ -833,12 +831,12 @@ crlf-io ; WRITE-CRLF uri url ; HTTP-URL record type - httpd-constants httpd-logging httpd-request httpd-responses httpd-basic-handlers ; HTTP-HOMEDIR, SERVE-ROOTED-FILE-PATH httpd-error ; HTTP-ERROR + sunet-version scsh-utilities ; INDEX scsh ; syscalls formats ; format