remove some superfluous comments/code
This commit is contained in:
parent
23dfce1dc7
commit
12b2b96582
|
@ -75,37 +75,21 @@
|
||||||
(if (pair? path) ; need at least one element
|
(if (pair? path) ; need at least one element
|
||||||
(let ((request-method (request:method req))
|
(let ((request-method (request:method req))
|
||||||
(path-string (uri-path-list->path path)))
|
(path-string (uri-path-list->path path)))
|
||||||
(cond
|
(if (or (string=? request-method "GET")
|
||||||
; ((string=? path-string "profile") ; triggers profiling
|
(string=? request-method "POST"))
|
||||||
; (http-syslog (syslog-level debug)
|
(let ((response
|
||||||
; "profiling: triggered in servlet-handler [~a]"
|
(if (resume-url? path-string)
|
||||||
; (profile-space)) ; PROFILE
|
(resume-url path-string servlet-path req)
|
||||||
; (make-http-error-response http-status/accepted req "profiled"))
|
(launch-new-instance path-string servlet-path req))))
|
||||||
; ((string=? path-string "reset") ; triggers cache clearing
|
(if (redirect-body? (response-body response))
|
||||||
; (http-syslog (syslog-level debug)
|
;; Pefix it with servlet-prefix.
|
||||||
; "servlet-handler: clearing servlet cache")
|
(make-redirect-response
|
||||||
; (reset-servlet-cache!)
|
(path-list->file-name
|
||||||
; (http-syslog (syslog-level debug)
|
(list (directory-as-file-name servlet-prefix)
|
||||||
; "servlet-handler: clearing instance table")
|
(redirect-body-location (response-body response)))))
|
||||||
; (reset-instance-table!)
|
response))
|
||||||
; (make-http-error-response http-status/accepted req "servlet cache cleared"))
|
(make-http-error-response http-status/method-not-allowed req
|
||||||
((or (string=? request-method "GET")
|
request-method)))
|
||||||
(string=? request-method "POST")) ; do this at later time
|
|
||||||
; )
|
|
||||||
(let ((response
|
|
||||||
(if (resume-url? path-string)
|
|
||||||
(resume-url path-string servlet-path req)
|
|
||||||
(launch-new-instance path-string servlet-path req))))
|
|
||||||
(if (redirect-body? (response-body response))
|
|
||||||
;; prefix with servlet-path
|
|
||||||
(make-redirect-response
|
|
||||||
(path-list->file-name
|
|
||||||
(list (directory-as-file-name servlet-prefix)
|
|
||||||
(redirect-body-location (response-body response)))))
|
|
||||||
response)))
|
|
||||||
(else
|
|
||||||
(make-http-error-response http-status/method-not-allowed req
|
|
||||||
request-method))))
|
|
||||||
(make-http-error-response http-status/bad-request req
|
(make-http-error-response http-status/bad-request req
|
||||||
(format #f "Bad path: ~s" path)))))
|
(format #f "Bad path: ~s" path)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue