Changeset 12724 in project


Ignore:
Timestamp:
12/02/08 22:34:44 (11 years ago)
Author:
sjamaan
Message:

Merge 1.11 - 1.12 changes from uri-generic release 4 into release 3

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

Legend:

Unmodified
Added
Removed
  • release/3/uri-generic/trunk

  • release/3/uri-generic/trunk/tests/run.scm

    r12617 r12724  
    101101    ("" ,base "http://a/b/c/d;p?q")
    102102    (,base "http:" "http:")
     103    (,base "..%2f" "http://a/b/c/..%2f")
     104    ("http://a/b/c/d/" ".." "http://a/b/c/")
     105    ("http://a/b/c/d/" "../e" "http://a/b/c/e")
     106    ("http://a/b/c/d/" "../e/" "http://a/b/c/e/")
     107    ("http://a/b//c///d///" "..//.." "http://a/b/")
    103108    ))
    104109
  • release/3/uri-generic/trunk/uri-generic.scm

    r12617 r12724  
    145145;; Character classes
    146146 
    147 (define (hexdigit-char? c)    (char-set-contains? char-set:hex-digit c))
    148 
    149 (define (reserved-char? c)    (char-set-contains? char-set:reserved c))
    150 
    151 (define (unreserved-char? c)  (char-set-contains? char-set:unreserved c))
    152 
    153 (define (scheme-char? c)      (char-set-contains? char-set:scheme c))
    154 
    155 (define (ipv-future-char? c)  (char-set-contains? char-set:ipv-future c))
     147(define (hexdigit-char? c)    (and (char? c) (char-set-contains? char-set:hex-digit c)))
     148
     149(define (reserved-char? c)    (and (char? c) (char-set-contains? char-set:reserved c)))
     150
     151(define (unreserved-char? c)  (and (char? c) (char-set-contains? char-set:unreserved c)))
     152
     153(define (scheme-char? c)      (and (char? c) (char-set-contains? char-set:scheme c)))
     154
     155(define (ipv-future-char? c)  (and (char? c) (char-set-contains? char-set:ipv-future c)))
    156156
    157157(define (pct-encoded? c)      (match c ((#\% h1 h2) #t) (else #f)))
     
    569569(define (slash-segment s)
    570570  (match s
    571          ((#\/ . rst)  (match (segment rst)
    572                               ((ss rst)  (list (cons #\/ ss) rst))
    573                               (else #f)))
     571         ((#\/ . rst)
     572          (or (slash-segment rst)
     573              (match (segment rst)
     574                     ((ss rst)  (list (cons #\/ ss) rst))
     575                     (else #f))))
    574576         (else  #f)))
    575577
     
    879881(define (merge0 pb pr)
    880882  (let* ((rpb  (reverse pb))
    881          (pb1  (reverse (if (and (pair? rpb) (not (string=? (car rpb) "/"))) (cdr rpb) rpb)))
     883         (pb1  (reverse (if (pair? rpb) (cdr rpb) rpb)))
    882884         (pr1  (or (and (pair? pr) (not (string=? ".." (car pr))) (not (string=? "." (car pr)))
    883                         (not (string-prefix? "/" (car pr))) 
     885                        (not (string-prefix? "/" (car pr)))
    884886                        (cons (string-append "/" (car pr)) (cdr pr)))
    885887                   pr)))
  • release/3/uri-generic/trunk/uri-generic.setup

    r12617 r12724  
    2121
    2222  ;; Assoc list with properties for your extension:
    23   '((version 1.11)
     23  '((version 1.12)
    2424    (documentation "uri-generic.html")
    2525    ,@(if has-exports? `((exports "uri-generic.exports")) (list)) ))
Note: See TracChangeset for help on using the changeset viewer.