couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1156507 - /couchdb/trunk/src/couchdb/couch_httpd_view.erl
Date Thu, 11 Aug 2011 06:39:05 GMT
Author: davisp
Date: Thu Aug 11 06:39:05 2011
New Revision: 1156507

URL: http://svn.apache.org/viewvc?rev=1156507&view=rev
Log:
Parse temp view parameters after the view is created

Patch by: Jason Smith
Re: COUCHDB-1228 2/4


Modified:
    couchdb/trunk/src/couchdb/couch_httpd_view.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd_view.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_view.erl?rev=1156507&r1=1156506&r2=1156507&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_view.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_view.erl Thu Aug 11 06:39:05 2011
@@ -90,19 +90,19 @@ handle_temp_view_req(#httpd{method='POST
     Reduce = get_reduce_type(Req),
     case couch_util:get_value(<<"reduce">>, Props, null) of
     null ->
-        QueryArgs = parse_view_params(Req, Keys, map),
         {ok, View, Group} = couch_view:get_temp_map_view(Db, Language,
             DesignOptions, MapSrc),
+        QueryArgs = parse_view_params(Req, Keys, map),
         output_map_view(Req, View, Group, Db, QueryArgs, Keys);
     _ when Reduce =:= false ->
-        QueryArgs = parse_view_params(Req, Keys, red_map),
         {ok, View, Group} = couch_view:get_temp_map_view(Db, Language,
             DesignOptions, MapSrc),
+        QueryArgs = parse_view_params(Req, Keys, red_map),
         output_map_view(Req, View, Group, Db, QueryArgs, Keys);
     RedSrc ->
-        QueryArgs = parse_view_params(Req, Keys, reduce),
         {ok, View, Group} = couch_view:get_temp_reduce_view(Db, Language,
             DesignOptions, MapSrc, RedSrc),
+        QueryArgs = parse_view_params(Req, Keys, reduce),
         output_reduce_view(Req, Db, View, Group, QueryArgs, Keys)
     end;
 



Mime
View raw message