Skip to content

Commit

Permalink
now redirect-to is a special leftparen version of the PLT web-server/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
rob7hunter committed Dec 9, 2008
1 parent f851d57 commit 72ff364
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion leftparen.scm
Expand Up @@ -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)))

Expand Down Expand Up @@ -145,6 +145,7 @@
**
page-url
redirect-to-page
(rename-out (response-promise-to-redirect redirect-to))
js-inc
css-inc
versioned-file-reference
Expand Down
1 change: 1 addition & 0 deletions page.scm
Expand Up @@ -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"))
Expand Down
2 changes: 1 addition & 1 deletion session.scm
Expand Up @@ -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)
Expand Down

0 comments on commit 72ff364

Please sign in to comment.