Changeset 12916 in project


Ignore:
Timestamp:
12/29/08 15:00:29 (11 years ago)
Author:
sjamaan
Message:

Merge from uri-generic release 4

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

Legend:

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

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

    r12858 r12916  
    178178
    179179(define encode/decode-cases
    180   '(("foo?bar" "foo%3fbar")
     180  '(("foo?bar" "foo%3Fbar")
    181181    ("foo&bar" "foo%26bar")
    182182    ("foo%20bar" "foo%2520bar")))
  • release/3/uri-generic/trunk/uri-generic.scm

    r12909 r12916  
    247247(define (pct-encode char-list char-set)
    248248  (define (hex-digit i)
    249     (and (>= i 0) (< i 16) (car (string->list (sprintf "~X" i)))))
     249    (and (>= i 0) (< i 16)
     250         (car (string->list (string-upcase (number->string i 16))))))
    250251  (reverse (fold (lambda (c cl)
    251252                   (if (char-set-contains? char-set c)
     
    764765  (string-intersperse
    765766   (map (lambda (segment)
    766           (string-translate* segment '(("/" . "%2F"))))
     767          (uri-encode-string segment (char-set #\/)))
    767768        segments) "/"))
    768769
Note: See TracChangeset for help on using the changeset viewer.