Skip to content
Snippets Groups Projects
Commit 5bd5d3cf authored by Marco Baringer's avatar Marco Baringer
Browse files

Fix handling of escape characters in header-values

darcs-hash:3dfa4bc3f19a3533117a879fc58728844c312d9a
parent 9f0a95cd
No related branches found
No related tags found
No related merge requests found
......@@ -360,7 +360,7 @@ The returned strings may actually be displaced arrays."
(defun parse-key-values (key-value-string)
"Returns an alist of the keys and values in KEY-VALUE-STRING.
KEY-VALUE-STRING is of the form: (\w+=\w+;)*"
KEY-VALUE-STRING is of the form: (\w+=\"\w+\";)*"
(declare (optimize (speed 3) (safety 0) (debug 0))
(type (array character (*)) key-value-string))
(flet ((make-adjustable-string (&optional (default-size 20))
......@@ -382,7 +382,9 @@ KEY-VALUE-STRING is of the form: (\w+=\w+;)*"
(setf key (make-adjustable-string)
value (make-adjustable-string))))
(if (eql :escape state)
(extend value)
(progn
(extend value)
(setf state :in-double-quote))
(case char
(#\=
(ecase state
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment