Remove HTTP-CONSTANTS / http/constants.scm.
This commit is contained in:
parent
35f79521d8
commit
1a1dcebbd0
|
@ -81,7 +81,7 @@
|
||||||
|
|
||||||
(let ((request-invariant-cgi-env ; environment variables that never change
|
(let ((request-invariant-cgi-env ; environment variables that never change
|
||||||
`(("PATH" . ,(and (getenv "PATH") cgi-bin-path))
|
`(("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))))
|
("SERVER_NAME" . ,(host-info:name (host-info (system-name))))
|
||||||
("GATEWAY_INTERFACE" . "CGI/1.1"))))
|
("GATEWAY_INTERFACE" . "CGI/1.1"))))
|
||||||
(lambda (path req)
|
(lambda (path req)
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
;;; Constants
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
(define server/version "Scheme-Underground/1.0")
|
|
||||||
(define server/protocol "HTTP/1.0")
|
|
|
@ -18,6 +18,8 @@
|
||||||
;;; The server top-level. PATH-HANDLER is the top-level request path handler --
|
;;; The server top-level. PATH-HANDLER is the top-level request path handler --
|
||||||
;;; the procedure that actually deals with the request.
|
;;; the procedure that actually deals with the request.
|
||||||
|
|
||||||
|
(define server/protocol "HTTP/1.0")
|
||||||
|
|
||||||
(define (httpd options)
|
(define (httpd options)
|
||||||
(let ((port (httpd-options-port options))
|
(let ((port (httpd-options-port options))
|
||||||
(root-dir (httpd-options-root-directory options))
|
(root-dir (httpd-options-root-directory options))
|
||||||
|
@ -272,7 +274,7 @@
|
||||||
(write-crlf port)
|
(write-crlf port)
|
||||||
|
|
||||||
(send-http-header-fields
|
(send-http-header-fields
|
||||||
(list (cons 'server server/version)
|
(list (cons 'server sunet-version-identifier)
|
||||||
(cons 'content-type (response-mime response))
|
(cons 'content-type (response-mime response))
|
||||||
(cons 'date (time->http-date-string (response-seconds response))))
|
(cons 'date (time->http-date-string (response-seconds response))))
|
||||||
port)
|
port)
|
||||||
|
|
|
@ -316,10 +316,6 @@
|
||||||
v0.9-request?
|
v0.9-request?
|
||||||
version->string))
|
version->string))
|
||||||
|
|
||||||
(define-interface httpd-constants-interface
|
|
||||||
(export server/version
|
|
||||||
server/protocol))
|
|
||||||
|
|
||||||
(define-interface httpd-responses-interface
|
(define-interface httpd-responses-interface
|
||||||
(export make-response response?
|
(export make-response response?
|
||||||
response-code
|
response-code
|
||||||
|
@ -406,6 +402,11 @@
|
||||||
|
|
||||||
;; Structures
|
;; Structures
|
||||||
|
|
||||||
|
(define-structure sunet-version (export sunet-version-identifier)
|
||||||
|
(open scheme)
|
||||||
|
(begin
|
||||||
|
(define sunet-version-identifier 2.0)))
|
||||||
|
|
||||||
;; Net protocols and formats
|
;; Net protocols and formats
|
||||||
|
|
||||||
(define-structure parse-html-forms parse-html-forms-interface
|
(define-structure parse-html-forms parse-html-forms-interface
|
||||||
|
@ -693,8 +694,9 @@
|
||||||
httpd-error
|
httpd-error
|
||||||
httpd-logging
|
httpd-logging
|
||||||
httpd-request
|
httpd-request
|
||||||
httpd-constants
|
|
||||||
httpd-responses
|
httpd-responses
|
||||||
|
|
||||||
|
sunet-version
|
||||||
scheme)
|
scheme)
|
||||||
(files (httpd core)))
|
(files (httpd core)))
|
||||||
|
|
||||||
|
@ -743,10 +745,6 @@
|
||||||
scheme)
|
scheme)
|
||||||
(files (httpd request)))
|
(files (httpd request)))
|
||||||
|
|
||||||
(define-structure httpd-constants httpd-constants-interface
|
|
||||||
(open scheme)
|
|
||||||
(files (httpd constants)))
|
|
||||||
|
|
||||||
(define-structure httpd-responses httpd-responses-interface
|
(define-structure httpd-responses httpd-responses-interface
|
||||||
(open scheme
|
(open scheme
|
||||||
srfi-9
|
srfi-9
|
||||||
|
@ -833,12 +831,12 @@
|
||||||
crlf-io ; WRITE-CRLF
|
crlf-io ; WRITE-CRLF
|
||||||
uri
|
uri
|
||||||
url ; HTTP-URL record type
|
url ; HTTP-URL record type
|
||||||
httpd-constants
|
|
||||||
httpd-logging
|
httpd-logging
|
||||||
httpd-request
|
httpd-request
|
||||||
httpd-responses
|
httpd-responses
|
||||||
httpd-basic-handlers ; HTTP-HOMEDIR, SERVE-ROOTED-FILE-PATH
|
httpd-basic-handlers ; HTTP-HOMEDIR, SERVE-ROOTED-FILE-PATH
|
||||||
httpd-error ; HTTP-ERROR
|
httpd-error ; HTTP-ERROR
|
||||||
|
sunet-version
|
||||||
scsh-utilities ; INDEX
|
scsh-utilities ; INDEX
|
||||||
scsh ; syscalls
|
scsh ; syscalls
|
||||||
formats ; format
|
formats ; format
|
||||||
|
|
Loading…
Reference in New Issue