Repository: couchdb-chttpd
Updated Branches:
  refs/heads/1.x-compat [created] 5d08f62f8


1.x compat: parse form data for externals on PUT in addtion ot POST


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/6421adc5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/6421adc5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/6421adc5

Branch: refs/heads/1.x-compat
Commit: 6421adc5c200781f95b7bfdb66718bff35cb423c
Parents: a57e869
Author: Jan Lehnardt <[email protected]>
Authored: Sat Dec 12 15:09:01 2015 +0100
Committer: Jan Lehnardt <[email protected]>
Committed: Sat Dec 12 15:09:01 2015 +0100

----------------------------------------------------------------------
 src/chttpd_external.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/6421adc5/src/chttpd_external.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_external.erl b/src/chttpd_external.erl
index 6986a04..9df120f 100644
--- a/src/chttpd_external.erl
+++ b/src/chttpd_external.erl
@@ -69,7 +69,7 @@ json_req_obj(#httpd{mochi_req=Req,
         Else -> Else
     end,
     ParsedForm = case Req:get_primary_header_value("content-type") of
-        "application/x-www-form-urlencoded" ++ _ when Method =:= 'POST' ->
+        "application/x-www-form-urlencoded" ++ _ when Method =:= 'POST' orelse 
Method =:= 'PUT' ->
             mochiweb_util:parse_qs(Body);
         _ ->
             []

Reply via email to