X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=src.lisp;h=d39d32b249b127e83b6ff8925472923998bb95f1;hb=1c768744300916893c359ccf18cfe2dbb55b3978;hp=a19f889d327a1d346ba3d735c4a0b80b193b4aba;hpb=f181b50e627397400a908bca980ab95cb1e637de;p=puri.git diff --git a/src.lisp b/src.lisp index a19f889..d39d32b 100644 --- a/src.lisp +++ b/src.lisp @@ -4,7 +4,7 @@ ;; ;; copyright (c) 1999-2002 Franz Inc, Berkeley, CA - All rights reserved. ;; copyright (c) 2002-2005 Franz Inc, Oakland, CA - All rights reserved. -;; copyright (c) 2003-2006 Kevin Rosenberg (porting changes) +;; copyright (c) 2003-2010 Kevin Rosenberg ;; ;; This code is free software; you can redistribute it and/or ;; modify it under the terms of the version 2.1 of @@ -355,10 +355,14 @@ ;; Parsing (defparameter *excluded-characters* - '(;; `delims' (except #\%, because it's handled specially): + (append + (loop for i from 0 to #x1f + collect (code-char i)) + '(;; `delims' (except #\%, because it's handled specially): #\< #\> #\" #\space #\# + ;; `unwise': - #\{ #\} #\| #\\ #\^ #\[ #\] #\`)) + #\{ #\} #\| #\\ #\^ #\[ #\] #\`))) (defun reserved-char-vector (chars &key except) (do* ((a (make-array 127 :element-type 'bit :initial-element 0)) @@ -846,11 +850,10 @@ URI ~s contains illegal character ~s at position ~d." #+allegro (with-output-to-string (s) (excl::maybe-print-fast s port)) ) - (when path - (encode-escaped-encoding path - nil - ;;*reserved-path-characters* - escape)) + (encode-escaped-encoding (or path "/") + nil + ;;*reserved-path-characters* + escape) (when query "?") (when query (encode-escaped-encoding query nil escape)) (when fragment "#")