Skip to content
Browse files

correctly url-encoding-decode things again

  • Loading branch information...
1 parent 88a0a63 commit e3cbb15e4efad4668e4894cad05cd6106c1ad3d4 @vii committed Jan 11, 2010
Showing with 8 additions and 5 deletions.
  1. +8 −5 src/http/dispatcher.lisp
View
13 src/http/dispatcher.lisp
@@ -18,18 +18,21 @@
(defun-speedy map-http-params (func)
(declare (dynamic-extent func) (type (function (simple-byte-vector simple-byte-vector) t) func))
- (flet ((parse-params (str)
+ (labels (
+ (f (name value)
+ (funcall func (url-encoding-decode name) (url-encoding-decode value)))
+ (parse-params (str)
(when str
(match-bind ( (* name "=" value (or (last) "&")
- '(funcall func name value)))
+ '(f name value)))
str)))
(parse-cookie-params (str)
(when str
(match-bind ( (* name "=" value (or (last) "," ";")
- '(funcall func name value)))
+ '(f name value)))
str))))
- (declare (inline parse-cookie-params parse-params)
- (dynamic-extent #'parse-params #'parse-cookie-params))
+ (declare (inline parse-cookie-params parse-params f)
+ (dynamic-extent #'parse-params #'parse-cookie-params #'f))
(parse-params (servestate-query-string*))
(parse-params (servestate-post-parameters*))
(parse-cookie-params (servestate-cookie*))))

0 comments on commit e3cbb15

Please sign in to comment.
Something went wrong with that request. Please try again.