Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-chttpd/pull/33#discussion_r39497223
  
    --- Diff: src/chttpd_db.erl ---
    @@ -449,6 +449,45 @@ 
db_req(#httpd{method='POST',path_parts=[_,<<"_bulk_docs">>], user_ctx=Ctx}=Req,
     db_req(#httpd{path_parts=[_,<<"_bulk_docs">>]}=Req, _Db) ->
         send_method_not_allowed(Req, "POST");
     
    +
    +db_req(#httpd{method='POST',
    +              path_parts=[_, <<"_bulk_get">>],
    +              mochi_req=MochiReq}=Req,
    +       Db) ->
    +    couch_stats:increment_counter([couchdb, httpd, bulk_requests]),
    +    couch_httpd:validate_ctype(Req, "application/json"),
    +    {JsonProps} = chttpd:json_body_obj(Req),
    +    case couch_util:get_value(<<"docs">>, JsonProps) of
    +    undefined ->
    +        throw({bad_request, <<"Missing JSON list of 'docs'.">>});
    +    Docs ->
    +        #doc_query_args{
    +            options = Options
    +        } = bulk_get_parse_doc_query(Req),
    +
    +        AcceptMixedMp = MochiReq:accepts_content_type("multipart/mixed"),
    +        AcceptRelatedMp = 
MochiReq:accepts_content_type("multipart/related"),
    +
    +        case AcceptMixedMp orelse AcceptRelatedMp of
    +        true ->
    +            throw({not_acceptable,
    --- End diff --
    
    It's left as reserved place for TODO: to have compatible with Couchbase on 
this endpoint, we need to support multipart responses as they don't use JSON 
ones. I didn't finished that part, suddenly ):


---
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.
---

Reply via email to