Completed support for http://www.ietf.org/rfc/rfc2396.txt 2.4.3 by adding special case for control code 7F.

Had to increase the bit-vector length to 128, and added #\Rubout (#x7F) to *excluded-characters*.

Added a docstring and test.
This commit is contained in:
Ryan Davis
2010-04-02 16:55:14 -04:00
committed by Kevin Rosenberg
parent 1c76874430
commit 7960648a3b
2 changed files with 16 additions and 12 deletions

View File

@ -408,15 +408,17 @@
:condition-type 'uri-parse-error)
res)
;;an escaped newline isn't rendered properly
(push
`(let ((weird-uri "https://example.com/q?foo%0abar%20baz"))
(test
weird-uri
(puri:render-uri (puri:parse-uri weird-uri) nil)
:test #'string=)
) 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))))