Github user kxepal commented on a diff in the pull request:
https://github.com/apache/couchdb-couch/pull/162#discussion_r59878224
--- Diff: src/couch_changes.erl ---
@@ -349,6 +366,19 @@ check_docids(_) ->
throw({bad_request, Msg}).
+check_selector(Selector={_}) ->
+ try
+ mango_selector:normalize(Selector)
+ catch
+ {mango_error, _Mod, Reason} -> % see MANGO_ERROR(R) in mango.hrl
+ Msg = io_lib:format("Selector error: ~p", [Reason]),
+ throw({bad_request, Msg})
+ end;
+check_selector(Selector) ->
+ Msg = io_lib:format("Selector error: ~p, expected an object",
[Selector]),
--- End diff --
May be not send back the Selector data? The case: send ~1GiB of data like
`{"selector": [....]}` and let server try to serialize that 1GiB of data and
send it back to you.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---