- (let ((c1 (charhex (schar query (1+ spos))))
- (c2 (charhex (schar query (+ spos 2)))))
- (declare (fixnum c1 c2))
- (setf (schar str dpos)
- (code-char (logior c2 (ash c1 4))))
- (incf spos 2))
- (setf (schar str dpos) ch)))))
-
-
+ (let ((c1 (charhex (schar query (1+ spos))))
+ (c2 (charhex (schar query (+ spos 2)))))
+ (declare (fixnum c1 c2))
+ (setf (schar str dpos)
+ (code-char (logior c2 (ash c1 4))))
+ (incf spos 2))
+ (setf (schar str dpos) ch)))))
+
+
+(defun uri-query-to-alist (query)
+ "Converts non-decoded URI query to an alist of settings"
+ (mapcar (lambda (set)
+ (let ((lst (kmrcl:delimited-string-to-list set #\=)))
+ (cons (first lst) (second lst))))
+ (kmrcl:delimited-string-to-list
+ (kmrcl:decode-uri-string query) #\&)))