2002-06-08 11:08:31 -04:00
|
|
|
;; Scheme 48 package definitions for the
|
2002-08-26 11:12:06 -04:00
|
|
|
;; Scheme Untergrund Networking Suite
|
|
|
|
|
|
|
|
;;; This file is part of the Scheme Untergrund Networking package.
|
|
|
|
|
|
|
|
;;; Copyright (c) 1994 by Brian D. Carlstrom and Olin Shivers.
|
|
|
|
;;; Copyright (c) 1996-2002 by Mike Sperber.
|
|
|
|
;;; Copyright (c) 2000-2002 by Martin Gasbichler.
|
2002-12-03 05:41:04 -05:00
|
|
|
;;; Copyright (c) 1998-2001 by Eric Marsden.
|
2002-08-26 11:12:06 -04:00
|
|
|
;;; For copyright information, see the file COPYING which comes with
|
|
|
|
;;; the distribution.
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
;; Interfaces
|
|
|
|
|
|
|
|
;; Net protocols and formats
|
|
|
|
|
|
|
|
(define-interface parse-html-forms-interface
|
|
|
|
(export parse-html-form-query unescape-uri+))
|
|
|
|
|
|
|
|
(define-interface htmlout-interface
|
|
|
|
(export emit-tag
|
|
|
|
emit-close-tag
|
|
|
|
|
|
|
|
emit-p
|
|
|
|
emit-title
|
|
|
|
emit-header ; And so forth...
|
|
|
|
|
|
|
|
with-tag
|
|
|
|
with-tag*
|
|
|
|
|
|
|
|
escape-html
|
2004-08-13 11:34:00 -04:00
|
|
|
emit-text
|
|
|
|
|
|
|
|
emit-prolog
|
|
|
|
xmlnsdecl-attr))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface smtp-interface
|
2003-01-21 10:31:38 -05:00
|
|
|
(export smtp-send-mail
|
|
|
|
smtp-expand smtp-verify smtp-help
|
2002-06-08 11:08:31 -04:00
|
|
|
smtp-transactions
|
|
|
|
smtp-transactions/no-close
|
2003-01-21 10:31:38 -05:00
|
|
|
smtp-connect
|
|
|
|
smtp-helo smtp-mail smtp-rcpt smtp-data
|
|
|
|
smtp-send smtp-soml smtp-saml smtp-rset smtp-expn
|
|
|
|
smtp-help smtp-noop smtp-quit smtp-turn))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface rfc822-interface
|
|
|
|
(export read-rfc822-headers
|
2003-01-20 11:26:26 -05:00
|
|
|
read-rfc822-headers-with-line-breaks
|
2002-06-08 11:08:31 -04:00
|
|
|
read-rfc822-field
|
2003-01-21 07:45:54 -05:00
|
|
|
read-rfc822-field-with-line-breaks
|
|
|
|
rfc822-time->string))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface uri-interface
|
|
|
|
(export parse-uri
|
|
|
|
uri-escaped-chars
|
|
|
|
unescape-uri
|
|
|
|
escape-uri
|
2003-01-14 10:01:21 -05:00
|
|
|
split-uri
|
|
|
|
uri-path->uri
|
2002-06-08 11:08:31 -04:00
|
|
|
simplify-uri-path))
|
|
|
|
|
|
|
|
(define-interface url-interface
|
2003-01-15 05:59:46 -05:00
|
|
|
(export server?
|
|
|
|
make-server
|
2002-06-08 11:08:31 -04:00
|
|
|
|
2003-01-15 05:59:46 -05:00
|
|
|
server-user
|
|
|
|
server-password
|
|
|
|
server-host
|
|
|
|
server-port
|
2002-11-29 09:56:58 -05:00
|
|
|
|
2003-01-15 05:59:46 -05:00
|
|
|
parse-server
|
|
|
|
server->string
|
2002-06-08 11:08:31 -04:00
|
|
|
|
2003-01-15 05:36:16 -05:00
|
|
|
http-url?
|
|
|
|
make-http-url
|
2002-06-08 11:08:31 -04:00
|
|
|
|
2003-01-15 05:59:46 -05:00
|
|
|
http-url-server
|
2002-11-29 09:56:58 -05:00
|
|
|
http-url-path
|
|
|
|
http-url-search
|
2003-01-15 07:19:45 -05:00
|
|
|
http-url-fragment-identifier
|
2002-06-08 11:08:31 -04:00
|
|
|
|
2003-01-15 05:36:16 -05:00
|
|
|
parse-http-url
|
|
|
|
parse-http-url-string
|
2002-06-08 11:08:31 -04:00
|
|
|
http-url->string))
|
|
|
|
|
2003-01-16 05:34:39 -05:00
|
|
|
(define-interface ftp-library-interface
|
|
|
|
(export copy-port->port-binary
|
|
|
|
copy-port->port-ascii
|
2003-01-16 08:09:14 -05:00
|
|
|
copy-ascii-port->port
|
|
|
|
parse-port-arg))
|
2003-01-16 05:34:39 -05:00
|
|
|
|
2002-06-08 11:08:31 -04:00
|
|
|
(define-interface ftp-interface
|
|
|
|
(export ftp-connect
|
2003-01-16 07:52:16 -05:00
|
|
|
(ftp-type :syntax)
|
|
|
|
ftp-set-type!
|
2002-06-08 11:08:31 -04:00
|
|
|
ftp-rename
|
|
|
|
ftp-delete
|
|
|
|
ftp-cd
|
|
|
|
ftp-cdup
|
|
|
|
ftp-pwd
|
|
|
|
ftp-rmdir
|
|
|
|
ftp-mkdir
|
|
|
|
ftp-modification-time
|
|
|
|
ftp-size
|
|
|
|
ftp-abort
|
|
|
|
ftp-quit
|
|
|
|
ftp-ls
|
|
|
|
ftp-dir
|
|
|
|
ftp-get
|
|
|
|
ftp-put
|
|
|
|
ftp-append
|
|
|
|
ftp-quot
|
2003-01-16 08:33:39 -05:00
|
|
|
ftp-error?
|
|
|
|
|
|
|
|
copy-port->port-binary
|
|
|
|
copy-port->port-ascii
|
|
|
|
copy-ascii-port->port))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface netrc-interface
|
2003-01-21 09:20:13 -05:00
|
|
|
(export netrc-machine-entry
|
|
|
|
netrc-entry?
|
|
|
|
netrc-entry-machine
|
|
|
|
netrc-entry-login
|
|
|
|
netrc-entry-password
|
|
|
|
netrc-entry-account
|
|
|
|
netrc-macro-definitions))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface pop3-interface
|
|
|
|
(export pop3-connect
|
|
|
|
pop3-stat
|
2003-01-21 03:21:20 -05:00
|
|
|
pop3-retrieve-message
|
|
|
|
pop3-retrieve-headers
|
2002-06-08 11:08:31 -04:00
|
|
|
pop3-last
|
|
|
|
pop3-delete
|
|
|
|
pop3-reset
|
2003-01-21 03:21:20 -05:00
|
|
|
pop3-quit
|
|
|
|
pop3-error?))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
2003-01-21 05:03:27 -05:00
|
|
|
(define-interface rfc868-interface
|
|
|
|
(export rfc868-time/tcp rfc868-time/udp))
|
|
|
|
|
|
|
|
(define-interface rfc867-interface
|
|
|
|
(export rfc867-daytime/tcp rfc867-daytime/udp))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface dns-interface
|
2003-01-20 09:21:33 -05:00
|
|
|
(export dns-clear-cache! ; clears the cache
|
2002-09-05 05:25:42 -04:00
|
|
|
dns-lookup ; complex lookup function
|
|
|
|
dns-lookup-name ; simple lookup function
|
|
|
|
dns-inverse-lookup ; obsolete, use dns-lookup-ip
|
|
|
|
dns-lookup-ip ; simple lookup function
|
|
|
|
dns-lookup-nameserver ; simple lookup function
|
|
|
|
dns-lookup-mail-exchanger ; simple lookpu function
|
2003-01-20 09:21:33 -05:00
|
|
|
pretty-print-dns-message ; prints a human readable dns-msg
|
2002-09-05 05:25:42 -04:00
|
|
|
force-ip ; reruns a lookup until a ip is resolved
|
|
|
|
force-ip-list ; reruns a lookup until a list of ips is resolved
|
|
|
|
address32->ip-string ; converts a address32 in an ip-string
|
|
|
|
ip-string->address32 ; converts a ip-string in an address32
|
|
|
|
dns-find-nameserver ; returns a nameserver
|
|
|
|
dns-find-nameserver-list ; returns a list of nameservers
|
2003-08-19 10:36:08 -04:00
|
|
|
dns-check-nameservers ; checks for working nameservers
|
2002-09-05 05:25:42 -04:00
|
|
|
socket-address->fqdn
|
2002-09-05 05:38:37 -04:00
|
|
|
host-fqdn
|
2004-03-24 15:53:19 -05:00
|
|
|
system-fqdn
|
|
|
|
|
|
|
|
dns-get-information
|
|
|
|
|
|
|
|
(network-protocol :syntax)
|
|
|
|
network-protocol?
|
|
|
|
dns-lookup
|
|
|
|
|
|
|
|
dns-message? dns-message-query dns-message-reply dns-message-cache?
|
|
|
|
dns-message-protocol dns-message-tried-nameservers
|
|
|
|
|
|
|
|
pretty-print-dns-message
|
|
|
|
|
|
|
|
message? message-header message-questions message-answers
|
|
|
|
message-nameservers message-additionals message-source
|
|
|
|
|
|
|
|
make-query-message make-simple-query-message
|
|
|
|
|
|
|
|
header? header-flags header-question-count header-answer-count
|
|
|
|
header-nameserver-count header-additional-count
|
|
|
|
|
|
|
|
flags? flags-query-type flags-opcode flags-authoritative?
|
|
|
|
flags-truncated? flags-recursion-desired? flags-recursion-available?
|
|
|
|
flags-zero flags-response-code
|
|
|
|
|
|
|
|
question? question-name question-type question-class
|
|
|
|
|
|
|
|
(message-class :syntax)
|
|
|
|
message-class? message-class-name message-class-number
|
|
|
|
|
|
|
|
(message-type :syntax)
|
|
|
|
message-type? message-type-name message-type-number
|
|
|
|
|
|
|
|
resource-record?
|
|
|
|
resource-record-name resource-record-type
|
|
|
|
resource-record-class resource-record-ttl
|
|
|
|
resource-record-data
|
|
|
|
|
|
|
|
resource-record-data-a? resource-record-data-a-ip
|
|
|
|
resource-record-data-ns? resource-record-data-ns-name
|
|
|
|
resource-record-data-cname? resource-record-data-cname-name
|
|
|
|
resource-record-data-mx? resource-record-data-mx-preference
|
|
|
|
resource-record-data-mx-exchanger resource-record-data-ptr?
|
|
|
|
resource-record-data-ptr-name
|
|
|
|
|
|
|
|
resource-record-data-soa?
|
|
|
|
resource-record-data-soa-mname
|
|
|
|
resource-record-data-soa-rname
|
|
|
|
resource-record-data-soa-serial
|
|
|
|
resource-record-data-soa-refresh
|
|
|
|
resource-record-data-soa-retry
|
|
|
|
resource-record-data-soa-expire
|
|
|
|
resource-record-data-soa-minimum
|
|
|
|
|
|
|
|
cache? cache-answer cache-ttl cache-time
|
|
|
|
|
|
|
|
resolv.conf-parse-error?
|
|
|
|
resolv.conf parse-resolv.conf!
|
|
|
|
|
|
|
|
domains-for-search))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
2003-02-10 07:30:43 -05:00
|
|
|
(define-interface ips-interface
|
|
|
|
(export address32->ip-string
|
|
|
|
ip-string->address32
|
|
|
|
ip-string->in-addr.arpa-string
|
|
|
|
octet-ip->address32 ;for dns.scm
|
|
|
|
ip-string?))
|
|
|
|
|
2003-01-22 05:44:56 -05:00
|
|
|
(define-interface cgi-scripts-interface
|
2002-06-08 11:08:31 -04:00
|
|
|
(export cgi-form-query))
|
|
|
|
|
|
|
|
;; Utility libraries
|
|
|
|
|
|
|
|
(define-interface rate-limit-interface
|
|
|
|
(export make-rate-limiter
|
|
|
|
rate-limit-block
|
|
|
|
rate-limit-open
|
|
|
|
rate-limit-close
|
|
|
|
rate-limiter-current-requests))
|
|
|
|
|
|
|
|
(define-interface crlf-io-interface
|
|
|
|
(export read-crlf-line
|
|
|
|
read-crlf-line-timeout
|
|
|
|
write-crlf))
|
|
|
|
|
|
|
|
(define-interface ls-interface
|
|
|
|
(export ls-crlf?
|
|
|
|
ls
|
|
|
|
arguments->ls-flags))
|
|
|
|
|
|
|
|
(define-interface format-net-interface
|
|
|
|
(export format-internet-host-address
|
|
|
|
format-port))
|
|
|
|
|
|
|
|
(define-interface sunet-utilities-interface
|
|
|
|
(export host-name-or-ip
|
2002-08-24 12:43:26 -04:00
|
|
|
on-interrupt
|
2002-08-26 10:49:17 -04:00
|
|
|
socket-address->string
|
|
|
|
dump
|
2002-08-26 12:36:25 -04:00
|
|
|
copy-inport->outport
|
2002-12-29 14:09:37 -05:00
|
|
|
dotdot-check
|
2003-02-19 12:05:16 -05:00
|
|
|
with-lock
|
|
|
|
get-header))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface handle-fatal-error-interface
|
|
|
|
(export with-fatal-error-handler*
|
|
|
|
(with-fatal-error-handler :syntax)))
|
|
|
|
|
|
|
|
;; FTP server
|
|
|
|
|
|
|
|
(define-interface ftpd-interface
|
2003-01-28 05:49:45 -05:00
|
|
|
(export with-port with-anonymous-home with-banner with-log-port with-dns-lookup?
|
2002-11-29 09:27:52 -05:00
|
|
|
make-ftpd-options
|
|
|
|
ftpd
|
2002-06-08 11:08:31 -04:00
|
|
|
ftpd-inetd))
|
|
|
|
|
|
|
|
;; Web server
|
|
|
|
|
|
|
|
(define-interface httpd-core-interface
|
2002-08-27 05:39:05 -04:00
|
|
|
(export httpd))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface httpd-make-options-interface
|
2002-08-26 09:10:57 -04:00
|
|
|
(export make-httpd-options
|
|
|
|
with-port
|
2002-06-08 11:08:31 -04:00
|
|
|
with-root-directory
|
|
|
|
with-fqdn
|
|
|
|
with-reported-port
|
2002-09-22 11:41:41 -04:00
|
|
|
with-request-handler
|
2002-06-08 11:08:31 -04:00
|
|
|
with-server-admin
|
|
|
|
with-simultaneous-requests
|
2003-01-30 11:09:20 -05:00
|
|
|
with-log-file
|
2002-08-22 12:40:10 -04:00
|
|
|
with-syslog?
|
2003-02-20 12:52:27 -05:00
|
|
|
with-resolve-ips?
|
|
|
|
with-post-bind-thunk))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface httpd-read-options-interface
|
|
|
|
(export httpd-options-port
|
|
|
|
httpd-options-root-directory
|
|
|
|
httpd-options-fqdn
|
|
|
|
httpd-options-reported-port
|
2002-09-22 11:41:41 -04:00
|
|
|
httpd-options-request-handler
|
2002-06-08 11:08:31 -04:00
|
|
|
httpd-options-server-admin
|
|
|
|
httpd-options-simultaneous-requests
|
2003-01-30 11:09:20 -05:00
|
|
|
httpd-options-log-file
|
2002-08-22 12:40:10 -04:00
|
|
|
httpd-options-syslog?
|
2003-02-20 12:52:27 -05:00
|
|
|
httpd-options-resolve-ips?
|
|
|
|
httpd-options-post-bind-thunk))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface httpd-access-control-interface
|
|
|
|
(export access-denier
|
|
|
|
access-allower
|
|
|
|
access-controller
|
|
|
|
access-controlled-handler))
|
|
|
|
|
2003-01-21 11:16:56 -05:00
|
|
|
(define-interface httpd-errors-interface
|
2002-06-08 11:08:31 -04:00
|
|
|
(export http-error?
|
|
|
|
http-error
|
|
|
|
fatal-syntax-error?
|
|
|
|
fatal-syntax-error))
|
|
|
|
|
|
|
|
(define-interface httpd-logging-interface
|
|
|
|
(export init-http-log!
|
2002-09-04 10:01:34 -04:00
|
|
|
http-syslog?
|
2002-06-08 11:08:31 -04:00
|
|
|
http-syslog
|
2002-09-04 10:01:34 -04:00
|
|
|
http-log
|
|
|
|
logging
|
|
|
|
make-logging))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
2002-11-26 07:52:39 -05:00
|
|
|
(define-interface httpd-requests-interface
|
|
|
|
(export make-request ; HTTP request
|
|
|
|
request? ; record type.
|
2002-11-29 09:49:22 -05:00
|
|
|
request-method
|
|
|
|
request-uri
|
|
|
|
request-url
|
|
|
|
request-version
|
|
|
|
request-headers
|
|
|
|
request-socket
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
version< version<=
|
|
|
|
v0.9-request?
|
|
|
|
version->string))
|
|
|
|
|
2002-08-26 05:46:11 -04:00
|
|
|
(define-interface httpd-responses-interface
|
|
|
|
(export make-response response?
|
|
|
|
response-code
|
|
|
|
response-message
|
|
|
|
response-seconds
|
|
|
|
response-mime
|
|
|
|
response-extras
|
|
|
|
response-body
|
|
|
|
|
2003-01-14 08:23:29 -05:00
|
|
|
make-nph-response nph-response?
|
|
|
|
nph-response-body
|
|
|
|
|
2003-02-06 10:05:15 -05:00
|
|
|
make-input-response input-response?
|
|
|
|
input-response-body-maker
|
|
|
|
|
2002-08-26 05:46:11 -04:00
|
|
|
make-writer-body writer-body?
|
2002-08-28 12:44:07 -04:00
|
|
|
make-reader-writer-body reader-writer-body?
|
2002-09-02 09:42:10 -04:00
|
|
|
make-redirect-body redirect-body? redirect-body-location
|
2002-08-26 05:59:14 -04:00
|
|
|
display-http-body
|
|
|
|
|
2003-01-09 10:05:30 -05:00
|
|
|
status-code?
|
|
|
|
status-code-number
|
|
|
|
status-code-message
|
2003-01-10 04:57:41 -05:00
|
|
|
(status-code :syntax)
|
|
|
|
name->status-code
|
2003-01-15 08:37:05 -05:00
|
|
|
number->status-code
|
2002-08-27 05:39:05 -04:00
|
|
|
|
2003-01-10 04:52:35 -05:00
|
|
|
make-error-response
|
2003-01-21 07:45:54 -05:00
|
|
|
make-redirect-response))
|
2002-08-26 05:46:11 -04:00
|
|
|
|
2002-06-08 11:08:31 -04:00
|
|
|
(define-interface httpd-basic-handlers-interface
|
2002-09-22 11:41:41 -04:00
|
|
|
(export make-predicate-handler
|
|
|
|
make-path-predicate-handler
|
2002-08-27 05:05:16 -04:00
|
|
|
make-host-name-handler
|
2002-08-22 11:32:03 -04:00
|
|
|
make-path-prefix-handler
|
2002-08-27 05:42:02 -04:00
|
|
|
alist-path-dispatcher
|
2002-09-22 11:41:41 -04:00
|
|
|
null-request-handler))
|
2002-08-26 05:46:11 -04:00
|
|
|
|
|
|
|
(define-interface httpd-file-directory-handlers-interface
|
|
|
|
(export home-dir-handler
|
2002-06-08 11:08:31 -04:00
|
|
|
tilde-home-dir-handler
|
|
|
|
rooted-file-handler
|
2003-01-28 10:16:20 -05:00
|
|
|
rooted-file-or-directory-handler
|
|
|
|
|
|
|
|
make-file-directory-options
|
|
|
|
with-file-name->content-type
|
|
|
|
with-file-name->content-encoding
|
2003-01-29 02:54:44 -05:00
|
|
|
with-file-name->icon-url
|
|
|
|
with-blank-icon-url
|
|
|
|
with-back-icon-url
|
|
|
|
with-unknown-icon-url))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
2002-11-29 09:42:02 -05:00
|
|
|
(define-interface httpd-seval-handlers-interface
|
2003-01-07 07:16:33 -05:00
|
|
|
(export seval-handler))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
2002-11-29 09:42:02 -05:00
|
|
|
(define-interface httpd-info-gateway-interface
|
2002-06-08 11:08:31 -04:00
|
|
|
(export info-handler
|
|
|
|
find-info-file
|
|
|
|
info-gateway-error))
|
|
|
|
|
2002-11-29 09:42:02 -05:00
|
|
|
(define-interface httpd-rman-gateway-interface
|
2002-06-08 11:08:31 -04:00
|
|
|
(export rman-handler
|
|
|
|
man
|
|
|
|
parse-man-entry
|
|
|
|
cat-man-page
|
|
|
|
find-man-file
|
|
|
|
file->man-directory
|
|
|
|
cat-n-decode
|
|
|
|
nroff-n-decode))
|
|
|
|
|
2002-11-29 09:42:02 -05:00
|
|
|
(define-interface httpd-cgi-handlers-interface
|
2002-06-08 11:08:31 -04:00
|
|
|
(export cgi-default-bin-path
|
|
|
|
cgi-handler))
|
|
|
|
|
|
|
|
(define-interface loser-interface (export loser))
|
|
|
|
|
|
|
|
(define-interface toothless-interface (interface-of scheme))
|
|
|
|
|
|
|
|
(define-interface toothless-eval-interface (export eval-safely))
|
|
|
|
|
|
|
|
;; Structures
|
|
|
|
|
2002-08-26 07:44:02 -04:00
|
|
|
(define-structure sunet-version (export sunet-version-identifier)
|
|
|
|
(open scheme)
|
|
|
|
(begin
|
2002-08-26 12:36:53 -04:00
|
|
|
(define sunet-version-identifier "2.0")))
|
2002-08-26 07:44:02 -04:00
|
|
|
|
2002-06-08 11:08:31 -04:00
|
|
|
;; Net protocols and formats
|
|
|
|
|
|
|
|
(define-structure parse-html-forms parse-html-forms-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2002-06-08 11:08:31 -04:00
|
|
|
let-opt
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-13 (string-index string-map))
|
2002-06-08 11:08:31 -04:00
|
|
|
receiving
|
2002-11-29 09:37:39 -05:00
|
|
|
uri)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib parse-forms)))
|
|
|
|
|
|
|
|
(define-structure htmlout htmlout-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-13 (string-fold))
|
2002-11-29 09:37:39 -05:00
|
|
|
formats
|
|
|
|
ascii
|
|
|
|
receiving)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib htmlout)))
|
|
|
|
|
2002-09-02 04:38:50 -04:00
|
|
|
(define-structure smtp smtp-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2003-01-22 04:29:55 -05:00
|
|
|
signals conditions
|
2003-01-21 10:31:38 -05:00
|
|
|
define-record-types
|
2002-09-02 04:36:42 -04:00
|
|
|
(subset srfi-1 (filter-map))
|
2003-01-21 10:31:38 -05:00
|
|
|
(subset srfi-13 (string-tokenize string-join))
|
2002-09-05 05:38:37 -04:00
|
|
|
crlf-io ; read-crlf-line write-crlf
|
|
|
|
receiving ; values receive
|
|
|
|
dns ; SYSTEM-FQDN
|
2003-01-21 10:31:38 -05:00
|
|
|
let-opt
|
|
|
|
(subset rfc822 (rfc822-time->string)))
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib smtp)))
|
|
|
|
|
|
|
|
(define-structure rfc822 rfc822-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2003-01-20 11:26:26 -05:00
|
|
|
receiving
|
|
|
|
(subset srfi-13 (string-map string-index string-concatenate))
|
|
|
|
let-opt
|
|
|
|
crlf-io
|
|
|
|
ascii)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib rfc822)))
|
|
|
|
|
|
|
|
(define-structure uri uri-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-13 (string-index string-index-right string-fold string-join))
|
2002-06-08 11:08:31 -04:00
|
|
|
let-opt
|
|
|
|
receiving
|
|
|
|
ascii
|
|
|
|
bitwise
|
2002-11-29 09:37:39 -05:00
|
|
|
field-reader-package)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib uri)))
|
|
|
|
|
|
|
|
(define-structure url url-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2002-11-29 09:56:58 -05:00
|
|
|
define-record-types
|
2002-06-08 11:08:31 -04:00
|
|
|
receiving
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-13 (string-index))
|
2002-06-08 11:08:31 -04:00
|
|
|
uri
|
2003-01-21 11:16:56 -05:00
|
|
|
httpd-errors)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib url)))
|
|
|
|
|
2003-01-16 05:34:39 -05:00
|
|
|
(define-structure ftp-library ftp-library-interface
|
|
|
|
(open scheme-with-scsh
|
2003-01-16 08:09:14 -05:00
|
|
|
(subset signals (call-error))
|
|
|
|
(subset srfi-1 (any))
|
2003-01-16 05:34:39 -05:00
|
|
|
crlf-io)
|
|
|
|
(files (lib ftp-library)))
|
|
|
|
|
2002-06-08 11:08:31 -04:00
|
|
|
(define-structure ftp ftp-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
|
|
|
netrc
|
2002-12-03 05:44:48 -05:00
|
|
|
define-record-types
|
2003-01-16 07:52:16 -05:00
|
|
|
finite-types
|
2002-06-08 11:08:31 -04:00
|
|
|
receiving
|
|
|
|
handle
|
|
|
|
conditions
|
|
|
|
signals
|
2003-01-16 04:40:34 -05:00
|
|
|
(subset srfi-13 (string-join string-prefix?))
|
2002-06-08 11:08:31 -04:00
|
|
|
let-opt
|
2002-08-26 10:49:17 -04:00
|
|
|
sunet-utilities
|
2003-01-16 04:23:05 -05:00
|
|
|
format-net
|
2003-01-16 08:32:43 -05:00
|
|
|
crlf-io
|
|
|
|
ftp-library)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib ftp)))
|
|
|
|
|
|
|
|
(define-structure netrc netrc-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2002-12-03 05:50:26 -05:00
|
|
|
define-record-types
|
2003-01-21 09:20:13 -05:00
|
|
|
srfi-14)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib netrc)))
|
|
|
|
|
|
|
|
(define-structure pop3 pop3-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2003-01-21 03:21:20 -05:00
|
|
|
netrc rfc822
|
2002-12-03 05:55:08 -05:00
|
|
|
define-record-types
|
2002-06-08 11:08:31 -04:00
|
|
|
handle
|
2003-01-20 09:52:03 -05:00
|
|
|
conditions handle-fatal-error
|
2002-06-08 11:08:31 -04:00
|
|
|
signals
|
2003-01-20 10:07:51 -05:00
|
|
|
(subset srfi-13 (string-index string-prefix? string-join))
|
2002-08-26 10:49:17 -04:00
|
|
|
let-opt
|
2002-11-29 09:37:39 -05:00
|
|
|
crlf-io)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib pop3)))
|
|
|
|
|
2003-01-21 05:03:27 -05:00
|
|
|
(define-structures ((rfc867 rfc867-interface)
|
|
|
|
(rfc868 rfc868-interface))
|
2003-01-21 07:02:51 -05:00
|
|
|
(open scheme-with-scsh
|
|
|
|
handle-fatal-error)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib nettime)))
|
|
|
|
|
|
|
|
(define-structure dns dns-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2002-12-17 11:32:16 -05:00
|
|
|
(subset srfi-1 (filter reverse! delete lset-difference lset-union))
|
2002-06-08 11:08:31 -04:00
|
|
|
tables
|
|
|
|
ascii
|
|
|
|
formats
|
|
|
|
signals
|
2003-01-16 15:08:14 -05:00
|
|
|
finite-types
|
2003-01-15 07:17:54 -05:00
|
|
|
define-record-types
|
2002-06-08 11:08:31 -04:00
|
|
|
random
|
|
|
|
queues
|
|
|
|
conditions
|
|
|
|
handle
|
|
|
|
sort
|
|
|
|
threads
|
2003-02-10 07:30:43 -05:00
|
|
|
locks
|
|
|
|
ips)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib dns)))
|
|
|
|
|
2003-02-10 07:30:43 -05:00
|
|
|
(define-structure ips ips-interface
|
|
|
|
(open scheme-with-scsh
|
|
|
|
formats)
|
|
|
|
(files (lib ip)))
|
|
|
|
|
2003-01-22 05:44:56 -05:00
|
|
|
(define-structure cgi-scripts cgi-scripts-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
|
|
|
parse-html-forms)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib cgi-script)))
|
|
|
|
|
|
|
|
;; Utility libraries
|
|
|
|
|
|
|
|
(define-structure rate-limit rate-limit-interface
|
|
|
|
(open scheme
|
|
|
|
define-record-types
|
|
|
|
locks
|
|
|
|
signals)
|
|
|
|
(files (lib rate-limit)))
|
|
|
|
|
|
|
|
(define-structure crlf-io crlf-io-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
|
|
|
ascii ; ascii->char
|
2002-06-08 11:08:31 -04:00
|
|
|
receiving ; MV return (RECEIVE and VALUES)
|
|
|
|
let-opt ; let-optionals
|
|
|
|
threads ; sleep
|
2002-11-29 09:37:39 -05:00
|
|
|
)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib crlf-io)))
|
|
|
|
|
|
|
|
(define-structure ls ls-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
|
|
|
handle
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-1 (filter))
|
|
|
|
bitwise
|
2002-06-08 11:08:31 -04:00
|
|
|
fluids
|
2002-11-29 09:37:39 -05:00
|
|
|
crlf-io)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib ls)))
|
|
|
|
|
|
|
|
(define-structure format-net format-net-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
|
|
|
let-opt)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib format-net)))
|
|
|
|
|
|
|
|
(define-structure sunet-utilities sunet-utilities-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2002-06-08 11:08:31 -04:00
|
|
|
format-net
|
|
|
|
sigevents
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-13 (string-join))
|
2002-08-26 11:33:22 -04:00
|
|
|
dns
|
2002-08-26 12:36:25 -04:00
|
|
|
let-opt ; :optional
|
2002-12-29 14:09:37 -05:00
|
|
|
locks
|
2002-06-08 11:08:31 -04:00
|
|
|
handle-fatal-error)
|
|
|
|
(files (lib sunet-utilities)))
|
|
|
|
|
|
|
|
(define-structure handle-fatal-error handle-fatal-error-interface
|
|
|
|
(open scheme conditions handle)
|
2002-12-19 09:27:31 -05:00
|
|
|
(files (lib handle-fatal-error)))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
;; FTP server
|
|
|
|
|
|
|
|
(define-structure ftpd ftpd-interface
|
2002-11-29 09:27:52 -05:00
|
|
|
(open scheme-with-scsh
|
2002-06-08 11:08:31 -04:00
|
|
|
conditions handle signals
|
2002-11-29 09:27:52 -05:00
|
|
|
define-record-types
|
2002-06-08 11:08:31 -04:00
|
|
|
handle-fatal-error
|
|
|
|
threads threads-internal ; last one to get CURRENT-THREAD
|
2002-12-19 11:33:13 -05:00
|
|
|
fluids thread-fluids
|
2002-11-29 09:27:52 -05:00
|
|
|
locks
|
|
|
|
(subset srfi-13 (string-map string-trim-both string-index))
|
2003-01-16 08:09:14 -05:00
|
|
|
(subset srfi-1 (partition))
|
2002-06-08 11:08:31 -04:00
|
|
|
crlf-io
|
|
|
|
ls
|
2003-01-16 05:34:39 -05:00
|
|
|
ftp-library
|
2002-08-22 13:12:08 -04:00
|
|
|
dns
|
2002-11-29 09:27:52 -05:00
|
|
|
sunet-version
|
2002-08-26 10:13:23 -04:00
|
|
|
sunet-utilities
|
2003-01-07 07:16:33 -05:00
|
|
|
receiving
|
|
|
|
format-net)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (ftpd ftpd)))
|
|
|
|
|
|
|
|
;; Web server
|
|
|
|
|
|
|
|
(define-structure httpd-core httpd-core-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
|
|
|
thread-fluids ; fork-thread
|
2003-01-07 07:16:33 -05:00
|
|
|
receiving
|
2002-06-08 11:08:31 -04:00
|
|
|
crlf-io ; write-crlf, read-crlf-line
|
2003-01-21 07:45:54 -05:00
|
|
|
rfc822
|
2002-06-08 11:08:31 -04:00
|
|
|
handle ; ignore-errors
|
|
|
|
conditions ; condition-stuff
|
|
|
|
uri
|
|
|
|
url
|
2003-01-07 07:16:33 -05:00
|
|
|
format-net
|
2002-06-08 11:08:31 -04:00
|
|
|
rate-limit ; rate-limiting stuff
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-13 (string-index))
|
2002-08-23 11:41:06 -04:00
|
|
|
dns ; dns-lookup-ip
|
2002-08-24 13:07:35 -04:00
|
|
|
sunet-utilities ; socket-address->string
|
2002-08-24 13:26:56 -04:00
|
|
|
locks ; make-lock et al.
|
2002-09-04 10:01:34 -04:00
|
|
|
fluids ; let-fluid
|
|
|
|
enumerated ; enum
|
2002-09-21 16:19:30 -04:00
|
|
|
architecture ; os-error
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
handle-fatal-error
|
|
|
|
httpd-read-options
|
2003-01-21 11:16:56 -05:00
|
|
|
httpd-errors
|
2002-06-08 11:08:31 -04:00
|
|
|
httpd-logging
|
2002-11-26 07:52:39 -05:00
|
|
|
httpd-requests
|
2002-08-26 05:46:11 -04:00
|
|
|
httpd-responses
|
2002-08-26 07:44:02 -04:00
|
|
|
|
|
|
|
sunet-version
|
2003-01-07 07:16:33 -05:00
|
|
|
)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (httpd core)))
|
|
|
|
|
|
|
|
(define-structures ((httpd-make-options httpd-make-options-interface)
|
|
|
|
(httpd-read-options httpd-read-options-interface))
|
|
|
|
(open scheme
|
|
|
|
define-record-types)
|
|
|
|
(files (httpd options)))
|
|
|
|
|
2003-01-09 07:59:43 -05:00
|
|
|
(define-structure httpd (compound-interface httpd-core-interface
|
|
|
|
httpd-make-options-interface)
|
|
|
|
(open httpd-core
|
|
|
|
httpd-make-options))
|
|
|
|
|
2002-06-08 11:08:31 -04:00
|
|
|
(define-structure httpd-access-control httpd-access-control-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-1 (any every))
|
2002-08-26 05:59:14 -04:00
|
|
|
httpd-responses
|
2002-11-26 07:52:39 -05:00
|
|
|
httpd-requests
|
2003-01-21 11:16:56 -05:00
|
|
|
httpd-errors
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-13 (string-map))
|
2002-11-29 09:37:39 -05:00
|
|
|
)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (httpd access-control)))
|
|
|
|
|
2003-01-21 11:16:56 -05:00
|
|
|
(define-structure httpd-errors httpd-errors-interface
|
2002-06-08 11:08:31 -04:00
|
|
|
(open conditions signals handle scheme)
|
|
|
|
(files (httpd error)))
|
|
|
|
|
|
|
|
(define-structure httpd-logging httpd-logging-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
|
|
|
httpd-read-options
|
2002-06-08 11:08:31 -04:00
|
|
|
i/o ; make-null-output-port
|
2003-01-07 07:16:33 -05:00
|
|
|
locks
|
|
|
|
receiving
|
2003-01-14 10:01:21 -05:00
|
|
|
uri ; uri-path->uri
|
2002-11-29 09:56:58 -05:00
|
|
|
url ; http-url-path
|
2002-11-26 07:52:39 -05:00
|
|
|
httpd-requests ; request record
|
2003-01-09 10:05:30 -05:00
|
|
|
httpd-responses
|
2003-01-07 07:16:33 -05:00
|
|
|
formats
|
2002-06-08 11:08:31 -04:00
|
|
|
format-net ; format-internet-host-address
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-13 (string-join string-trim))
|
2002-06-08 11:08:31 -04:00
|
|
|
rfc822 ; get-header
|
|
|
|
sunet-utilities ; on-interrupt
|
|
|
|
threads ; spawn
|
2002-08-22 12:40:10 -04:00
|
|
|
dns ; dns-lookup-ip
|
2003-01-07 07:16:33 -05:00
|
|
|
define-record-types
|
2002-09-05 06:55:30 -04:00
|
|
|
thread-fluids ; make-preserved-fluid et al.
|
2002-12-19 09:34:55 -05:00
|
|
|
handle-fatal-error
|
2002-11-29 09:37:39 -05:00
|
|
|
)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (httpd logging)))
|
|
|
|
|
2002-11-26 07:52:39 -05:00
|
|
|
(define-structure httpd-requests httpd-requests-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme
|
2002-11-29 09:49:22 -05:00
|
|
|
define-record-types)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (httpd request)))
|
|
|
|
|
2002-08-26 05:46:11 -04:00
|
|
|
(define-structure httpd-responses httpd-responses-interface
|
|
|
|
(open scheme
|
2002-08-27 05:39:05 -04:00
|
|
|
(subset scsh (format-date write-string time date))
|
2004-08-13 11:34:00 -04:00
|
|
|
url
|
|
|
|
htmlout
|
2002-08-27 05:39:05 -04:00
|
|
|
syslog
|
2003-01-07 07:16:33 -05:00
|
|
|
define-record-types
|
2003-01-09 10:05:30 -05:00
|
|
|
finite-types
|
2002-08-27 05:39:05 -04:00
|
|
|
formats
|
2003-01-10 04:57:41 -05:00
|
|
|
(subset signals (call-error))
|
2002-11-26 07:52:39 -05:00
|
|
|
httpd-requests
|
2002-08-27 05:39:05 -04:00
|
|
|
httpd-read-options)
|
2002-08-26 05:46:11 -04:00
|
|
|
(files (httpd response)))
|
|
|
|
|
2002-06-08 11:08:31 -04:00
|
|
|
(define-structure httpd-basic-handlers httpd-basic-handlers-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2002-08-26 12:36:25 -04:00
|
|
|
rfc822
|
2002-11-26 07:52:39 -05:00
|
|
|
httpd-requests ; REQUEST record type, v0.9-request
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-1 (fold-right))
|
2003-02-10 07:02:11 -05:00
|
|
|
(subset srfi-13 (string-trim string-prefix-ci?))
|
2002-08-27 05:42:02 -04:00
|
|
|
httpd-responses
|
2003-01-21 11:16:56 -05:00
|
|
|
httpd-errors
|
2002-08-26 05:46:11 -04:00
|
|
|
)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (httpd handlers)))
|
|
|
|
|
2002-08-26 05:46:11 -04:00
|
|
|
(define-structure httpd-file-directory-handlers httpd-file-directory-handlers-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2003-01-28 10:16:20 -05:00
|
|
|
define-record-types
|
2002-08-26 05:46:11 -04:00
|
|
|
httpd-core
|
2002-11-26 07:52:39 -05:00
|
|
|
httpd-requests
|
2002-08-26 05:46:11 -04:00
|
|
|
httpd-responses
|
2003-01-21 11:16:56 -05:00
|
|
|
httpd-errors
|
2002-08-27 05:32:12 -04:00
|
|
|
httpd-basic-handlers
|
2002-08-26 05:46:11 -04:00
|
|
|
httpd-read-options
|
|
|
|
url
|
|
|
|
htmlout
|
|
|
|
crlf-io
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-13 (string-join))
|
2003-01-24 04:48:37 -05:00
|
|
|
(subset rfc822 (rfc822-time->string))
|
2002-08-26 12:36:25 -04:00
|
|
|
sunet-utilities ; dotdot-check, copy-inport->outport
|
2002-08-26 05:46:11 -04:00
|
|
|
conditions
|
2003-01-29 05:08:25 -05:00
|
|
|
let-opt
|
2002-08-26 05:46:11 -04:00
|
|
|
handle-fatal-error
|
|
|
|
)
|
|
|
|
(files (httpd file-dir-handler)))
|
|
|
|
|
2002-11-29 09:49:46 -05:00
|
|
|
(define-structure httpd-seval-handlers httpd-seval-handlers-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh ; syscalls & INDEX
|
2003-01-21 11:16:56 -05:00
|
|
|
httpd-errors
|
2002-11-26 07:52:39 -05:00
|
|
|
httpd-requests ; v0.9-request
|
2002-08-26 05:59:14 -04:00
|
|
|
httpd-responses
|
2002-06-08 11:08:31 -04:00
|
|
|
httpd-logging ; http-log
|
2002-08-26 07:21:53 -04:00
|
|
|
uri ; UNESCAPE-URI
|
|
|
|
htmlout ; Formatted HTML output
|
2003-01-07 07:16:33 -05:00
|
|
|
pp
|
|
|
|
(subset srfi-13 (string-skip))
|
2002-06-08 11:08:31 -04:00
|
|
|
rfc822
|
2002-08-26 07:21:53 -04:00
|
|
|
toothless-eval ; EVAL-SAFELY
|
|
|
|
handle ; IGNORE-ERROR
|
|
|
|
parse-html-forms ; PARSE-HTML-FORM-QUERY
|
|
|
|
threads ; SLEEP
|
2003-02-19 12:05:16 -05:00
|
|
|
sunet-utilities ; GET-HEADER
|
2002-11-29 09:37:39 -05:00
|
|
|
)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (httpd seval)))
|
|
|
|
|
2002-11-29 09:42:02 -05:00
|
|
|
(define-structure httpd-info-gateway httpd-info-gateway-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-1 (find))
|
|
|
|
(subset srfi-13 (string-map string-skip string-index))
|
2002-06-08 11:08:31 -04:00
|
|
|
conditions signals handle
|
|
|
|
htmlout
|
2002-11-26 07:52:39 -05:00
|
|
|
httpd-requests
|
2002-08-26 05:59:14 -04:00
|
|
|
httpd-responses
|
2003-01-21 11:16:56 -05:00
|
|
|
httpd-errors
|
2002-06-08 11:08:31 -04:00
|
|
|
url
|
|
|
|
uri
|
2002-11-29 09:37:39 -05:00
|
|
|
handle-fatal-error)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (httpd info-gateway)))
|
|
|
|
|
2002-11-29 09:42:02 -05:00
|
|
|
(define-structure httpd-rman-gateway httpd-rman-gateway-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
|
|
|
httpd-responses
|
2002-11-26 07:52:39 -05:00
|
|
|
httpd-requests
|
2003-01-21 11:16:56 -05:00
|
|
|
httpd-errors
|
2002-06-08 11:08:31 -04:00
|
|
|
conditions
|
|
|
|
url
|
|
|
|
uri
|
|
|
|
htmlout
|
|
|
|
httpd-basic-handlers
|
|
|
|
handle-fatal-error
|
|
|
|
let-opt
|
2002-08-29 06:51:47 -04:00
|
|
|
sunet-utilities
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-13 (string-join))
|
|
|
|
)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (httpd rman-gateway)))
|
|
|
|
|
2002-11-29 09:42:02 -05:00
|
|
|
(define-structure httpd-cgi-handlers httpd-cgi-handlers-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme-with-scsh
|
2003-01-20 11:26:26 -05:00
|
|
|
(subset srfi-1 (alist-delete))
|
2003-01-07 07:16:33 -05:00
|
|
|
(subset srfi-13 (string-prefix? string-index string-trim substring/shared))
|
2002-06-08 11:08:31 -04:00
|
|
|
rfc822
|
|
|
|
crlf-io ; WRITE-CRLF
|
|
|
|
uri
|
|
|
|
url ; HTTP-URL record type
|
|
|
|
httpd-logging
|
2002-11-26 07:52:39 -05:00
|
|
|
httpd-requests
|
2002-08-26 05:59:14 -04:00
|
|
|
httpd-responses
|
2002-06-08 11:08:31 -04:00
|
|
|
httpd-basic-handlers ; HTTP-HOMEDIR, SERVE-ROOTED-FILE-PATH
|
2003-01-21 11:16:56 -05:00
|
|
|
httpd-errors ; HTTP-ERROR
|
2002-08-26 12:36:25 -04:00
|
|
|
httpd-file-directory-handlers ; dot-dot-check, copy-inport->outport
|
2002-08-26 07:44:02 -04:00
|
|
|
sunet-version
|
2003-01-07 07:16:33 -05:00
|
|
|
formats
|
|
|
|
format-net
|
2003-02-19 12:05:16 -05:00
|
|
|
sunet-utilities ; host-name-or-empty, get-header
|
2002-06-08 11:08:31 -04:00
|
|
|
let-opt ; let-optionals
|
2002-09-02 09:42:10 -04:00
|
|
|
handle-fatal-error
|
2002-11-29 09:37:39 -05:00
|
|
|
)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (httpd cgi-server)))
|
|
|
|
|
|
|
|
(define-structure loser (export loser)
|
2003-01-07 07:32:52 -05:00
|
|
|
(open scheme signals)
|
2002-06-08 11:08:31 -04:00
|
|
|
(begin (define (loser name)
|
|
|
|
(lambda x (error "Illegal call" name)))))
|
|
|
|
|
|
|
|
(define-structure toothless toothless-interface
|
|
|
|
(open scheme loser)
|
|
|
|
(begin
|
|
|
|
(define call-with-input-file (loser "call-with-input-file"))
|
|
|
|
(define call-with-output-file (loser "call-with-output-file"))
|
|
|
|
(define load (loser "load"))
|
|
|
|
(define open-input-file (loser "open-input-file"))
|
|
|
|
(define open-output-file (loser "open-output-file"))
|
|
|
|
(define transcript-on (loser "transcript-on"))
|
|
|
|
(define with-input-from-file (loser "with-input-from-file"))
|
|
|
|
(define with-input-to-file (loser "with-input-to-file"))
|
|
|
|
(define eval (loser "eval"))
|
|
|
|
(define interaction-environment (loser "interaction-environment"))
|
|
|
|
(define scheme-report-environment (loser "scheme-report-environment"))))
|
|
|
|
|
|
|
|
(define-structure toothless-eval toothless-eval-interface
|
2002-11-29 09:37:39 -05:00
|
|
|
(open scheme
|
2002-06-08 11:08:31 -04:00
|
|
|
package-commands-internal ; config-package, get-reflective-tower
|
|
|
|
packages ; structure-package, make-simple-package
|
|
|
|
environments ; environment-ref
|
|
|
|
handle ; ignore-errors
|
2002-11-29 09:37:39 -05:00
|
|
|
)
|
2002-06-08 11:08:31 -04:00
|
|
|
(access toothless) ; Force it to be loaded.
|
|
|
|
(begin
|
|
|
|
|
|
|
|
(define toothless-struct (environment-ref (config-package) 'toothless))
|
|
|
|
(define toothless-package (structure-package toothless-struct))
|
|
|
|
|
|
|
|
(define (new-safe-package)
|
|
|
|
(make-simple-package (list toothless-struct) #t
|
|
|
|
(get-reflective-tower toothless-package) ; ???
|
|
|
|
'safe-env))
|
|
|
|
|
|
|
|
(define (eval-safely exp)
|
|
|
|
(ignore-errors (lambda () (eval exp (new-safe-package)))))))
|