Changeset 13220 in project


Ignore:
Timestamp:
02/08/09 16:51:09 (11 years ago)
Author:
sjamaan
Message:

Make use of new absolute-uri? predicate

File:
1 edited

Legend:

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

    r13206 r13220  
    22;; Spiffy the web server
    33;;
    4 ; Copyright (c) 2007-2008, Peter Bex
     4; Copyright (c) 2007-2009, Peter Bex
    55; Copyright (c) 2000-2005, Felix L. Winkelmann
    66; All rights reserved.
     
    333333(define (server-root-uri)
    334334  (let ((uri (request-uri (current-request))))
    335     (if (uri-host uri) ; use absolute-uri? here
     335    (if (absolute-uri? uri)
    336336        uri
    337337        (let ((host (determine-vhost))
     
    380380                        ;; Is this ok?
    381381                        ((handle-not-found) path)))
    382                   ;; No host or a relative URI in the request? That's an error.
     382                  ;; No host or non-absolute URI in the request is an error.
    383383                  (send-status 400 "Bad request"
    384384                               "<p>Your client sent a request that the server did not understand</p>"))))))
Note: See TracChangeset for help on using the changeset viewer.