[Ensure that input to destructuring-bind in parse-cookies-vnetscape is a 2-element list.
rich@holygoat.co.uk**20050825165956] {
hunk ./rfc2109.lisp 1960
+(defun ensure-pair (list delim)
+  "Ensure that the LIST has only two elements, by joining the 
+   elements of the tail with DELIM. Gentle failure: shorter 
+   lists are just returned.
+   LIST should be a list of strings." 
+  (declare (type list list)
+           (type string delim))
+  (if (<= (length list) 2)
+    list
+    (list (car list)
+          (format nil (concatenate 'string "~{~A~^" delim "~}") 
+	          (cdr list)))))
+
hunk ./rfc2109.lisp 1977
-      (destructuring-bind (name value) (split-sequence:split-sequence #\= cookie)
+      (destructuring-bind (name value) (ensure-pair (split-sequence:split-sequence #\= cookie) "=")
hunk ./rfc2109.lisp 1980
+
}
