Skip to content

Commit

Permalink
Omit headers & field-metas in multipart/form-data params.
Browse files Browse the repository at this point in the history
  • Loading branch information
fukamachi committed Dec 3, 2016
1 parent aebb94b commit 3e60411
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app.lisp
Expand Up @@ -126,7 +126,12 @@
((or symbol function)
(lambda (params)
(funcall controller
(append (request-parameters *request*)
(append (mapc (lambda (pair)
;; Omit headers & field-metas in multipart/form-data.
(when (consp (cdr pair))
(rplacd pair
(first (cdr pair)))))
(request-parameters *request*))
(loop for (k v) on params by #'cddr
collect (cons k v))))))
(T controller))
Expand Down

1 comment on commit 3e60411

@knobo
Copy link

@knobo knobo commented on 3e60411 Feb 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you remove this information? Is it available somewhere else?
Sometimes I need to get the filename (for example)
Like in this request:
------WebKitFormBoundarydD5Xg4b6BbYmn5A2
Content-Disposition: form-data; name="file"; filename="Screenshot from 2017-01-24 15-47-12.png"
Content-Type: image/png

Please sign in to comment.