Changeset 12954 in project


Ignore:
Timestamp:
01/07/09 20:29:16 (11 years ago)
Author:
sjamaan
Message:

Merge changes from release 4

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

Legend:

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

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

    r12924 r12954  
    1 
    21;;
    32;; Definitions and parsing routines for Uniform Resource Identifiers (RFC 3986).
     
    317316  (let ((cs (char-set-union char-set:uri-unreserved (char-set #\/))))
    318317    (match pcl
    319            (('/ . rst) (cons '/ (map (compose uri-char-list->string (cute pct-decode <> cs)) rst)))
    320            (else (map (compose uri-char-list->string (cute pct-decode <> cs)) pcl)))))
     318           (('/ . rst) (cons '/ (map (lambda (c)
     319                                       (uri-char-list->string (pct-decode c cs)))
     320                                     rst)))
     321           (else (map (lambda (c)
     322                        (uri-char-list->string (pct-decode c cs)))
     323                      pcl)))))
    321324
    322325(define (hier-part s)
     
    830833;;         => "http://bar.org/foo"
    831834;;
    832 ;;  (uri->string (non-strict-relative-to (uri "http:foo") (uri "http://bar.org/")) )
    833 ;;         => "http://bar.org/foo"
    834 ;;
    835835;;  Algorithm from RFC3986, section 5.2.2
    836836;;
     
    885885    (let ((mp  (if (and ba (null? pb)) pr (merge0 pb pr))))
    886886      mp)))
    887 
    888 (define (uri-non-strict-relative-to ref base)
    889   (let ((rs (uri-scheme ref))
    890         (rb (uri-scheme base)))
    891     (let ((ref1 (make-URI scheme: (if (eq? rs rb) #f (uri-scheme ref))
    892                           authority: (uri-auth ref) path: (uri-path ref)
    893                           query: (uri-query ref) fragment: (uri-fragment ref))))
    894       (uri-relative-to ref1 base))))
    895 
    896887
    897888;;  Remove dot segments, but protect leading '/' character
Note: See TracChangeset for help on using the changeset viewer.