| a | b | |
|---|
| 0 | 0 | | diff --git a/src/couchdb/couch_httpd_rewrite.erl b/src/couchdb/couch_httpd_rewrite.erl |
|---|
| ... | |
|---|
| 1 | | - | index 6c3d0e3..5fb0bee 100644 |
|---|
| 1 | + | index 6c3d0e3..998f41f 100644 |
|---|
| ... | |
|---|
| 2 | 2 | | --- a/src/couchdb/couch_httpd_rewrite.erl |
|---|
| 3 | 3 | | +++ b/src/couchdb/couch_httpd_rewrite.erl |
|---|
| ... | |
|---|
| 4 | | - | @@ -236,46 +236,20 @@ make_query_list([{Key, {Value}}|Rest], Bindings, Acc) -> |
|---|
| 4 | | - | Value1 = to_json({Value}), |
|---|
| 4 | | - | make_query_list(Rest, Bindings, [{to_binding(Key), Value1}|Acc]); |
|---|
| 4 | | - | make_query_list([{Key, Value}|Rest], Bindings, Acc) when is_binary(Value) -> |
|---|
| 4 | | - | - Value1 = replace_var(Key, Value, Bindings), |
|---|
| 4 | | - | + Value1 = replace_var(Value, Bindings), |
|---|
| 4 | + | @@ -239,43 +239,17 @@ make_query_list([{Key, Value}|Rest], Bindings, Acc) when is_binary(Value) -> |
|---|
| 4 | + | Value1 = replace_var(Key, Value, Bindings), |
|---|
| ... | |
|---|
| 10 | 10 | | make_query_list(Rest, Bindings, [{to_binding(Key), Value1}|Acc]); |
|---|
| 11 | 11 | | make_query_list([{Key, Value}|Rest], Bindings, Acc) when is_list(Value) -> |
|---|
| 12 | 12 | | - Value1 = replace_var(Key, Value, Bindings), |
|---|
| ... | |
|---|
| 13 | | - | + Value1 = to_json([replace_var(V, Bindings) || V <- Value]), |
|---|
| 13 | + | + Value1 = to_json([replace_var(Key, V, Bindings) || V <- Value]), |
|---|
| ... | |
|---|
| 14 | 14 | | make_query_list(Rest, Bindings, [{to_binding(Key), Value1}|Acc]); |
|---|
| 15 | 15 | | make_query_list([{Key, Value}|Rest], Bindings, Acc) -> |
|---|
| 16 | 16 | | make_query_list(Rest, Bindings, [{to_binding(Key), Value}|Acc]). |
|---|
| ... | |
|---|
| 47 | 47 | | - end |
|---|
| 48 | 48 | | - end. |
|---|
| 49 | 49 | | - |
|---|
| ... | |
|---|
| 50 | | - | +replace_var(<<":", Var/binary>> = Value, Bindings) -> |
|---|
| 50 | + | +replace_var(_Key, <<":", Var/binary>> = Value, Bindings) -> |
|---|
| ... | |
|---|
| 51 | 51 | | + get_var(Var, Bindings, Value); |
|---|
| ... | |
|---|
| 52 | | - | +replace_var(Value, _Bindings) when is_binary(Value) -> |
|---|
| 52 | + | +replace_var(_Key, Value, _Bindings) when is_binary(Value) -> |
|---|
| ... | |
|---|
| 53 | 53 | | + Value; |
|---|
| ... | |
|---|
| 54 | | - | +replace_var(Value, _Bindings) -> |
|---|
| 54 | + | +replace_var(_Key, Value, _Bindings) -> |
|---|
| ... | |
|---|
| 55 | 55 | | + to_json(Value). |
|---|
| 56 | 56 | | |
|---|
| 57 | 57 | | get_var(VarName, Props, Default) -> |
|---|
| ... | |
|---|