diff --git a/simple.scm b/simple.scm index b01dd01..b1013a5 100644 --- a/simple.scm +++ b/simple.scm @@ -192,7 +192,11 @@ (if (procedure? path) (set! *proc-resources* (cons (list path upcase-method proc) *proc-resources*)) (hash-table-set! *static-resources* - (list path upcase-method) proc)))) + (list + (cond ((string? path) path) + ((uri-reference? path) (uri->string path)) + (else (abort "unknown path type"))) + upcase-method) proc)))) methods))) (define (reset-resources!) @@ -316,10 +320,11 @@ ($ 'sid)))) (define (redirect-to new-uri) - ;; Just set the `%redirect' internal parameter, so `run-resource' is - ;; able to know where to redirect. - (%redirect new-uri) - "") + (display (string-append "