X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src.lisp;h=da6d9fd2af08c1a8812a6c428678e79c2c4a6971;hb=789e972d75dfe1e8432a11a8fa1b13b1b5ecb469;hp=ab13bad4a490d76a83fbe13d499e87eef7714d6a;hpb=3d8bae190ceef8b2b9f48fdffd6baacd270273d4;p=puri.git diff --git a/src.lisp b/src.lisp index ab13bad..da6d9fd 100644 --- a/src.lisp +++ b/src.lisp @@ -355,13 +355,19 @@ ;; Parsing (defparameter *excluded-characters* - '(;; `delims' (except #\%, because it's handled specially): + (append + ;; exclude control characters + (loop for i from 0 to #x1f + collect (code-char i)) + '(;; `delims' (except #\%, because it's handled specially): #\< #\> #\" #\space #\# + #\Rubout ;; (code-char #x7f) ;; `unwise': #\{ #\} #\| #\\ #\^ #\[ #\] #\`)) + "Excluded charcters from RFC2369 (http://www.ietf.org/rfc/rfc2396.txt 2.4.3)") (defun reserved-char-vector (chars &key except) - (do* ((a (make-array 127 :element-type 'bit :initial-element 0)) + (do* ((a (make-array 128 :element-type 'bit :initial-element 0)) (chars chars (cdr chars)) (c (car chars) (car chars))) ((null chars) a) @@ -379,7 +385,7 @@ (defparameter *reserved-path-characters* (reserved-char-vector (append *excluded-characters* - '(#\; + '(#\; #\% ;;;;The rfc says this should be here, but it doesn't make sense. ;; #\= #\/ #\?))))