Merge branch 'master' of git://git.b9.com/puri
authorMoskvitin Andrey <archimag@gmail.com>
Tue, 22 Feb 2011 18:37:31 +0000 (21:37 +0300)
committerMoskvitin Andrey <archimag@gmail.com>
Tue, 22 Feb 2011 18:37:31 +0000 (21:37 +0300)
debian/changelog
debian/control
debian/source/format [new file with mode: 0644]
src.lisp
tests.lisp

index e1f99d9..2adc0f9 100644 (file)
@@ -1,3 +1,16 @@
+cl-puri (1.5.5-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Fri, 07 May 2010 12:04:31 -0600
+
+cl-puri (1.5.4-1) unstable; urgency=low
+
+  * New upstream
+  * Switch to dpkg-source 3.0 (quilt) format
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Fri, 09 Apr 2010 10:42:28 -0600
+
 cl-puri (1.5.3-1) unstable; urgency=low
 
   * New upstream
index 026a494..7e63271 100644 (file)
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Kevin M. Rosenberg <kmr@debian.org>
 Build-Depends-Indep: dh-lisp
 Build-Depends: debhelper (>= 7.0.0)
-Standards-Version: 3.8.3.0
+Standards-Version: 3.8.4.0
 Homepage: http://files.b9.com/puri/
 Vcs-Git: git://git.b9.com/puri/
 Vcs-Browser: http://git.b9.com/puri/
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
index ddf4cc9..48a4543 100644 (file)
--- a/src.lisp
+++ b/src.lisp
 ;; 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)
 (defparameter *reserved-path-characters*
     (reserved-char-vector
      (append *excluded-characters*
-             '(#\;
+             '(#\; #\%
 ;;;;The rfc says this should be here, but it doesn't make sense.
                ;; #\=
                #\/ #\?))))
index b5cbe37..0344922 100644 (file)
        :condition-type 'uri-parse-error)
      res)
 
+    ;;; tests for weird control characters
+    ;; http://www.ietf.org/rfc/rfc2396.txt 2.4.3
+    (dolist (x '("https://example.com/q?foo%0abar%20baz" ;;an escaped newline
+                "https://example.com/q?%7f" ;; 7f, 127
+                ))
+      (push
+       `(let ((weird-uri ,x))
+         (test weird-uri
+               (puri:render-uri (puri:parse-uri weird-uri) nil)
+               :test #'string=)
+         ) res))
+
     `(progn ,@(nreverse res))))
 
 (defun do-tests ()