Ignore:
Timestamp:
10/12/08 22:55:29 (12 years ago)
Author:
sjamaan
Message:

Merge changes from uri-generic for chicken 3

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

Legend:

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

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

    r12004 r12140  
    702702   (fold (lambda (c ax)
    703703           (if (p c) (let* ((os (enc c)) 
    704                             (cs (map pct-encode os)))
    705                        (append (concatenate (reverse cs)) ax))
     704                            (cs (pct-encode os)))
     705                       (append (reverse cs) ax))
    706706               (cons c ax)))
    707707         (list) str)))
     
    712712        (loop (quotient i 256) (cons (modulo i 256) lst)))))
    713713
     714(define (pct? c) (char=? c #\%))
    714715
    715716(define (uri-encode-string str)
    716   (let ((clst (uri-string->char-list str)))
    717     (uri-char-list->string 
    718      (char-list-encode reserved-char? (compose integer->octets char->integer) clst))))
     717  (let ((clst (string->list str)))
     718    (uri-char-list->string
     719     (char-list-encode (disjoin pct? reserved-char?) (compose integer->octets char->integer) clst))))
    719720
    720721
Note: See TracChangeset for help on using the changeset viewer.