Added httpd-options-post-bind-thunk.
This commit is contained in:
parent
1b0b3f5690
commit
ef3a8af150
|
@ -41,8 +41,12 @@
|
|||
(lambda ()
|
||||
(with-cwd
|
||||
root-dir
|
||||
(bind-listen-accept-loop
|
||||
(bind-prepare-listen-accept-loop
|
||||
protocol-family/internet
|
||||
(lambda ()
|
||||
(cond ((httpd-options-post-bind-thunk options)
|
||||
=> (lambda (thunk)
|
||||
(thunk)))))
|
||||
;; Why is the output socket unbuffered? So that if the client
|
||||
;; closes the connection, we won't lose when we try to close the
|
||||
;; socket by trying to flush the output buffer.
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
simultaneous-requests
|
||||
log-file
|
||||
syslog?
|
||||
resolve-ips?)
|
||||
resolve-ips?
|
||||
post-bind-thunk)
|
||||
httpd-options?
|
||||
(port httpd-options-port
|
||||
set-httpd-options-port!)
|
||||
|
@ -37,7 +38,8 @@
|
|||
set-httpd-options-simultaneous-requests!)
|
||||
(log-file httpd-options-log-file set-httpd-options-log-file!)
|
||||
(syslog? httpd-options-syslog? set-httpd-options-syslog?!)
|
||||
(resolve-ips? httpd-options-resolve-ips? set-httpd-options-resolve-ips?!))
|
||||
(resolve-ips? httpd-options-resolve-ips? set-httpd-options-resolve-ips?!)
|
||||
(post-bind-thunk httpd-options-post-bind-thunk set-httpd-options-post-bind-thunk!))
|
||||
|
||||
; default httpd-options generation
|
||||
(define (make-default-httpd-options)
|
||||
|
@ -53,7 +55,8 @@
|
|||
; output-port: log to this port (e.g. (current-error-port))
|
||||
; #f: no logging
|
||||
#t ; Do syslogging?
|
||||
#t)) ; Write host names instead of IPs in log-files?
|
||||
#t ; Write host names instead of IPs in log-files?
|
||||
#f)) ; post-bind-thunk
|
||||
|
||||
; creates a copy of a given httpd-option
|
||||
|
||||
|
@ -77,6 +80,8 @@
|
|||
(set-httpd-options-log-file! new-options (httpd-options-log-file options))
|
||||
(set-httpd-options-syslog?! new-options (httpd-options-syslog? options))
|
||||
(set-httpd-options-resolve-ips?! new-options (httpd-options-resolve-ips? options))
|
||||
(set-httpd-options-post-bind-thunk! new-options
|
||||
(httpd-options-post-bind-thunk options))
|
||||
new-options))
|
||||
|
||||
; (make-httpd-options-transformer set-option!) -> lambda (new-value [httpd-option])
|
||||
|
@ -112,6 +117,8 @@
|
|||
(make-httpd-options-transformer set-httpd-options-syslog?!))
|
||||
(define with-resolve-ips?
|
||||
(make-httpd-options-transformer set-httpd-options-resolve-ips?!))
|
||||
(define with-post-bind-thunk
|
||||
(make-httpd-options-transformer set-httpd-options-post-bind-thunk!))
|
||||
|
||||
(define (make-httpd-options . stuff)
|
||||
(let loop ((options (make-default-httpd-options))
|
||||
|
|
|
@ -230,7 +230,8 @@
|
|||
with-simultaneous-requests
|
||||
with-log-file
|
||||
with-syslog?
|
||||
with-resolve-ips?))
|
||||
with-resolve-ips?
|
||||
with-post-bind-thunk))
|
||||
|
||||
(define-interface httpd-read-options-interface
|
||||
(export httpd-options-port
|
||||
|
@ -242,7 +243,8 @@
|
|||
httpd-options-simultaneous-requests
|
||||
httpd-options-log-file
|
||||
httpd-options-syslog?
|
||||
httpd-options-resolve-ips?))
|
||||
httpd-options-resolve-ips?
|
||||
httpd-options-post-bind-thunk))
|
||||
|
||||
(define-interface httpd-access-control-interface
|
||||
(export access-denier
|
||||
|
|
Loading…
Reference in New Issue