Changeset 12719 in project


Ignore:
Timestamp:
12/02/08 19:54:14 (11 years ago)
Author:
sjamaan
Message:

Fix problem with percent-encoded characters in unexpected places

Location:
release/4/uri-generic/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/uri-generic/trunk/tests/run.scm

    r12614 r12719  
    101101    ("" ,base "http://a/b/c/d;p?q")
    102102    (,base "http:" "http:")
     103    (,base "..%2f" "http://a/b/c/..%2f")
    103104    ))
    104105
  • release/4/uri-generic/trunk/uri-generic.scm

    r12614 r12719  
    133133;; Character classes
    134134 
    135 (define (hexdigit-char? c)    (char-set-contains? char-set:hex-digit c))
    136 
    137 (define (reserved-char? c)    (char-set-contains? char-set:reserved c))
    138 
    139 (define (unreserved-char? c)  (char-set-contains? char-set:unreserved c))
    140 
    141 (define (scheme-char? c)      (char-set-contains? char-set:scheme c))
    142 
    143 (define (ipv-future-char? c)  (char-set-contains? char-set:ipv-future c))
     135(define (hexdigit-char? c)    (and (char? c) (char-set-contains? char-set:hex-digit c)))
     136
     137(define (reserved-char? c)    (and (char? c) (char-set-contains? char-set:reserved c)))
     138
     139(define (unreserved-char? c)  (and (char? c) (char-set-contains? char-set:unreserved c)))
     140
     141(define (scheme-char? c)      (and (char? c) (char-set-contains? char-set:scheme c)))
     142
     143(define (ipv-future-char? c)  (and (char? c) (char-set-contains? char-set:ipv-future c)))
    144144
    145145(define (pct-encoded? c)      (match c ((#\% h1 h2) #t) (else #f)))
Note: See TracChangeset for help on using the changeset viewer.