Changeset 17960 in project


Ignore:
Timestamp:
04/28/10 21:03:56 (9 years ago)
Author:
Jim Ursetto
Message:

spiffy: flush output after response to allow TCP buffering;
send Content-length: 0 on null send-response body

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/spiffy/trunk/spiffy.scm

    r17933 r17960  
    252252
    253253(define (send-response #!key (code 200) (reason "OK") body (headers '()))
    254   (let ((new-headers (if body
    255                          (cons `(content-length ,(string-length body)) headers)
    256                          headers)))
     254  (let ((new-headers (cons `(content-length ,(if body (string-length body) 0))
     255                           headers)))
    257256   (parameterize ((current-response
    258257                   (update-response (current-response)
     
    437436                (send-status 400 "Bad request"
    438437                             "<p>Your client sent a request that the server did not understand</p>"))
     438            (flush-output out)
    439439            (handle-another-request?))))))) ; Keep going?
    440440
Note: See TracChangeset for help on using the changeset viewer.