couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxepal <...@git.apache.org>
Subject [GitHub] couchdb-chttpd pull request: Enable POST requests to /_changes in ...
Date Sat, 31 Jan 2015 12:44:01 GMT
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-chttpd/pull/22#discussion_r23888645
  
    --- Diff: src/chttpd_db.erl ---
    @@ -87,7 +87,13 @@ handle_changes_req(#httpd{method='GET'}=Req, Db) ->
         _ ->
             Msg = <<"Supported `feed` types: normal, continuous, longpoll, eventsource">>,
             throw({bad_request, Msg})
    -    end;
    +    end.
    +
    +handle_changes_req(#httpd{method='POST'}=Req, Db) ->
    +    couch_httpd:validate_ctype(Req, "application/json"),
    +    handle_changes_req1(Req, Db);
    +handle_changes_req(#httpd{method='GET'}=Req, Db) ->
    +    handle_changes_req1(Req, Db);
     handle_changes_req(#httpd{path_parts=[_,<<"_changes">>]}=Req, _Db) ->
         send_method_not_allowed(Req, "GET,HEAD").
    --- End diff --
    
    You forgot to define `POST` as allowed method here.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message