You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2016/04/17 19:32:48 UTC

couchdb-global-changes git commit: enable feed=eventsource for /_db_updates

Repository: couchdb-global-changes
Updated Branches:
  refs/heads/2665-db-updates-eventsource [created] e4cf3bf61


enable feed=eventsource for /_db_updates

The fix is adding `eventsource` to the allowed options to
/_db_updates?feed=eventsource, since the underlying implementation
is a global database’s _changes feed.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/commit/e4cf3bf6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/tree/e4cf3bf6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/diff/e4cf3bf6

Branch: refs/heads/2665-db-updates-eventsource
Commit: e4cf3bf61b3520b821ae03aa2f900134a4c2b2ef
Parents: e55de37
Author: Jan Lehnardt <ja...@apache.org>
Authored: Sun Apr 17 19:31:22 2016 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Sun Apr 17 19:31:22 2016 +0200

----------------------------------------------------------------------
 src/global_changes_httpd.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/blob/e4cf3bf6/src/global_changes_httpd.erl
----------------------------------------------------------------------
diff --git a/src/global_changes_httpd.erl b/src/global_changes_httpd.erl
index 1d50fb9..07a7353 100644
--- a/src/global_changes_httpd.erl
+++ b/src/global_changes_httpd.erl
@@ -57,10 +57,10 @@ handle_global_changes_req(#httpd{method='GET'}=Req) ->
             chttpd:etag_respond(Req, Etag, fun() ->
                 fabric:changes(Db, fun changes_callback/2, Acc#acc{etag=Etag}, Options1)
             end);
-        Feed when Feed =:= "continuous"; Feed =:= "longpoll" ->
+        Feed when Feed =:= "continuous"; Feed =:= "longpoll"; Feed =:= "eventsource" ->
             fabric:changes(Db, fun changes_callback/2, Acc, Options1);
         _ ->
-            Msg = <<"Supported `feed` types: normal, continuous, longpoll">>,
+            Msg = <<"Supported `feed` types: normal, continuous, longpoll, eventsource">>,
             throw({bad_request, Msg})
     end;
 handle_global_changes_req(Req) ->