Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
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.

Closes COUCHDB-2665
  • Loading branch information
janl committed Apr 17, 2016
1 parent e55de37 commit 40e88fc7b95017270400e4fa78c3357f125fb0f0
Showing 1 changed file with 2 additions and 2 deletions.
@@ -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) ->

0 comments on commit 40e88fc

Please sign in to comment.