This is an automated email from the ASF dual-hosted git repository. willholley pushed a commit to branch upstream-2.20.0 in repository https://gitbox.apache.org/repos/asf/couchdb-mochiweb.git
commit 58699cbe9a8be680ae9a956a07ea5a6a859e0038 Author: Bob Ippolito <[email protected]> AuthorDate: Mon Mar 11 22:57:58 2019 +0000 Remove compile(tuple_calls) from examples/keepalive --- examples/keepalive/keepalive.erl | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/examples/keepalive/keepalive.erl b/examples/keepalive/keepalive.erl index a371e91..51a7c3a 100644 --- a/examples/keepalive/keepalive.erl +++ b/examples/keepalive/keepalive.erl @@ -1,7 +1,5 @@ -module(keepalive). --compile(tuple_calls). - %% your web app can push data to clients using a technique called comet long %% polling. browsers make a request and your server waits to send a %% response until data is available. see wikipedia for a better explanation: @@ -33,7 +31,7 @@ start(Options = [{port, _Port}]) -> mochiweb_http:start([{name, ?MODULE}, {loop, ?LOOP} | Options]). loop(Req) -> - Path = Req:get(path), + Path = mochiweb_request:get(path, Req), case string:tokens(Path, "/") of ["longpoll" | RestOfPath] -> %% the "reentry" is a continuation -- what @mochiweb_http@ @@ -74,10 +72,10 @@ resume(Req, RestOfPath, Reentry) -> %% if we didn't call @Reentry@ here then the function would finish and the %% process would exit. calling @Reentry@ takes care of returning control %% to @mochiweb_http@ - io:format("reentering loop via continuation in ~p~n", [Req:get(path)]), + io:format("reentering loop via continuation in ~p~n", [mochiweb_request:get(path, Req)]), Reentry(Req). ok(Req, Response) -> - Req:ok({_ContentType = "text/plain", - _Headers = [], - Response}). + mochiweb_request:ok( + {_ContentType = "text/plain", _Headers = [], Response}, + Req).
