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

@ -356,16 +356,18 @@
(defparameter *excluded-characters*
(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)