runtime path

svn: r13352
This commit is contained in:
Jay McCarthy 2009-02-02 17:49:29 +00:00
parent 99e9376a73
commit 0c60212360

View File

@ -1,8 +1,7 @@
#lang scheme/base #lang scheme
(require mzlib/contract (require scheme/runtime-path
mzlib/list net/url
net/url) web-server/http/response-structs
(require web-server/http/response-structs
web-server/private/xexpr web-server/private/xexpr
web-server/http/request-structs) web-server/http/request-structs)
@ -20,6 +19,10 @@
(srcloc-source (cdr item))) (srcloc-source (cdr item)))
"<unknown location>"))))) "<unknown location>")))))
(define-runtime-path default-error-style-sheet
(list 'lib
"web-server/default-web-root/htdocs/error.css"))
(define (pretty-exception-response url exn) (define (pretty-exception-response url exn)
`(html `(html
(head (head
@ -111,7 +114,7 @@
(lambda (in) (read-string (file-size path) in)))) (lambda (in) (read-string (file-size path) in))))
(provide/contract (provide/contract
[file-response ((natural-number/c string? path-string?) (listof header?) . ->* . (response/c))] [file-response ((natural-number/c string? path-string?) () #:rest (listof header?) . ->* . response/c)]
[servlet-loading-responder (url? exn? . -> . response/c)] [servlet-loading-responder (url? exn? . -> . response/c)]
[gen-servlet-not-found (path-string? . -> . (url? . -> . response/c))] [gen-servlet-not-found (path-string? . -> . (url? . -> . response/c))]
[servlet-error-responder (url? exn? . -> . response/c)] [servlet-error-responder (url? exn? . -> . response/c)]