From 1f10457d5298afc8d5150f0891f919f0e6a08395 Mon Sep 17 00:00:00 2001 From: interp Date: Fri, 24 Jan 2003 16:05:39 +0000 Subject: [PATCH] Adapt to recent changes in surflet-handler --- .../web-server/root/surflets/add-raw.scm | 45 +++++++------------ 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/scheme/httpd/surflets/web-server/root/surflets/add-raw.scm b/scheme/httpd/surflets/web-server/root/surflets/add-raw.scm index 4080d3a..933f8c2 100644 --- a/scheme/httpd/surflets/web-server/root/surflets/add-raw.scm +++ b/scheme/httpd/surflets/web-server/root/surflets/add-raw.scm @@ -4,7 +4,8 @@ parse-html-forms ; PARSE-HTML-FORM-QUERY url ; HTTP-URL-SEARCH srfi-1 ; FILTER - surflet-handler/surflet ; SEND/SUSPEND, SEND/FINISH + surflet-handler/surflets ; SEND/SUSPEND, SEND/FINISH + surflet-handler/responses ; MAKE-SURFLET-RESPONSE scheme-with-scsh) (begin @@ -22,15 +23,11 @@ (define (make-get-number-page input-text title) (lambda (new-url) - (make-response + (make-surflet-response (status-code ok) - #f - (time) "text/html" '() - (make-writer-body - (lambda (out options) - (format out " + (format #f " ~a ~a

@@ -47,26 +44,21 @@

" - (if title - (format #f "~a" title) - "") - (if title - (format #f "

~a

" title)) - new-url - input-text - )) - )))) + (if title + (format #f "~a" title) + "") + (if title + (format #f "

~a

" title)) + new-url + input-text + )))) (define (make-result-page new-url) - (make-response + (make-surflet-response (status-code ok) - #f - (time) "text/html" '() - (make-writer-body - (lambda (out options) - (format out " + (format #f " Result @@ -80,9 +72,8 @@ Close this session " - (number->string (+ (get-number1) (get-number2))) - new-url))) - )) + (number->string (+ (get-number1) (get-number2))) + new-url))) (define (get-number input-text . maybe-title) (let* ((title (if (pair? maybe-title) (car maybe-title) #f)) @@ -105,9 +96,7 @@ (send/suspend make-result-page) ;; This finishes the session and does a redirect to the root ;; page. - (send/finish - (make-error-response (status-code moved-temp) req - "/" "/"))) + (send-error (status-code moved-temp) #f "/" "/")) )) \ No newline at end of file