From 72ff364c683ef89b0de58747884d2440499fbfb4 Mon Sep 17 00:00:00 2001 From: Rob Hunter Date: Tue, 9 Dec 2008 11:04:27 -0800 Subject: [PATCH] now redirect-to is a special leftparen version of the PLT web-server/http/redirect) provided function (the LP version allows headers to be set along with a redirect, which is common if you are setting a cookie); got rid of the "group"ing of the body list in a sessioned-response because it was hokey (and causing a bug)...list-response is a much cleaner way --- leftparen.scm | 3 ++- page.scm | 1 + session.scm | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/leftparen.scm b/leftparen.scm index 7a8f2ca..e72ccba 100644 --- a/leftparen.scm +++ b/leftparen.scm @@ -28,7 +28,7 @@ ;; the work of others: (except-out (all-from-out (planet "web.scm" ("soegaard" "web.plt" 2 1))) - comment?) + comment? redirect-to) ; we use our own modification of redirect-to (all-from-out (planet "dispatch.ss" ("untyped" "dispatch.plt" 1 5))) (all-from-out (planet "instaservlet.ss" ("untyped" "instaservlet.plt" 1 7))) @@ -145,6 +145,7 @@ ** page-url redirect-to-page + (rename-out (response-promise-to-redirect redirect-to)) js-inc css-inc versioned-file-reference diff --git a/page.scm b/page.scm index 9b538ef..7e00881 100644 --- a/page.scm +++ b/page.scm @@ -83,6 +83,7 @@ (last body)))) (cond (redirect-to (response-promise-to-redirect redirect-to)) ((response/full? returned-body) returned-body) + ((response-promise? returned-body) returned-body) (plain-text (basic-response (list returned-body) ;; Hey, this is probably where we go all unicode... #:type #"text/plain; charset=us-ascii")) diff --git a/session.scm b/session.scm index 7e7a355..b491806 100644 --- a/session.scm +++ b/session.scm @@ -83,7 +83,7 @@ (let ((body-lst (list body ...))) (or (single-response-promise-in-list body-lst) (single-response/full-in-list body-lst) - `(group ,@body-lst)))))))) + (list-response body-lst)))))))) (define (cookied-response cookie-key-str cookie-val-str #:expire-in (expire-in THIRTY_DAYS)