Changeset 5734 in project


Ignore:
Timestamp:
08/25/07 17:36:22 (13 years ago)
Author:
sjamaan
Message:

Simplify write-fragment-response

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spiffy/trunk/spiffy-base.scm

    r5732 r5734  
    231231   (spiffy-not-found-handler (lambda () (old (current-request)))) ;; Slightly ugly, but needed so toplevel config can redefine it
    232232   (lambda (req)
    233      (parameterize ((current-request req))     
     233     (parameterize ((current-request req))
    234234       (handle-exceptions exn
    235235         (begin
     
    337337; - Kindly suggested by Kirill Lisovsky
    338338
    339 (define (write-fragment-response fragments)
     339(define (write-fragment-response . fragments)
    340340  (let ([dest (make-string 256)]
    341341        [dsize 256] )
     
    373373  (current-response-code '(303 . "See Other"))
    374374  (set-header! (sprintf "Location: ~A" loc))
    375   (write-fragment-response `(,(sprintf "<html><head><title>Moved</title><body><h1>Moved</h1>Please see <a href=\"~A\">~A</a>.</body></html>" loc loc))))
     375  (write-fragment-response (sprintf "<html><head><title>Moved</title><body><h1>Moved</h1>Please see <a href=\"~A\">~A</a>.</body></html>" loc loc)))
    376376
    377377(define (redirect loc)
Note: See TracChangeset for help on using the changeset viewer.