10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
-
-
-
+
+
-
+
|
;; PURPOSE.
;; (require-extension syntax-case)
;; (declare (run-time-macros))
(require-library dbi)
(define getenv get-environment-variable)
(include "requirements.scm")
(include "cookie.scm")
(include "html-filter.scm")
(include "misc-stml.scm")
(include "formdat.scm")
(include "stml.scm")
;; (include "dbi.scm")
(include "session.scm")
(include "setup.scm") ;; s:session gets created here
(include "sqltbl.scm")
(include "keystore.scm")
;; (include "sugar.scm")
(slot-set! s:session 'log-port ;; (current-error-port))
(open-output-file (slot-ref s:session 'logfile) #:append))
(sdat-set-log-port! s:session ;; (current-error-port))
(open-output-file (sdat-get-logfile s:session) #:append))
;; (s:log "HTTP_COOKIE" (getenv "HTTP_COOKIE"))
;; (s:log "HTTP_COOKIE" (get-environment-variable "HTTP_COOKIE"))
;; (s:log "stdin-dat=" (slot-ref s:session 'stdin-dat))
(s:validate-inputs)
(session:run-actions s:session)
(slot-set! s:session 'pagedat
|