Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moved formatting of rexi calls to couch_httpd layer

  • Loading branch information...
commit 2114a65d23acc57c40bc9fa8f87e06612f6578c3 1 parent bcc3f3e
Robert Dionne authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 apps/couch/src/couch_httpd_misc_handlers.erl
11 apps/couch/src/couch_httpd_misc_handlers.erl
View
@@ -222,12 +222,17 @@ handle_rexi_calls_req(#httpd{method='GET'}=Req) ->
ok = couch_httpd:verify_is_server_admin(Req),
NoCalls = list_to_integer(couch_httpd:qs_value(Req, "n", "20")),
{ok, Data} = rexi_server:calls(NoCalls),
+ %% TODO: convert to JSON format
+ Msgs = lists:map(fun(Elem) ->
+ [Ts,From,Nonce,M,F,A] = Elem,
+ io_lib:format("[~p] from: ~p nonce: ~p ~n ~p ~p ~p ~n",
+ [calendar:now_to_datetime(Ts),From,Nonce,M,F,A])
+ end,Data),
{ok, Resp} = start_chunked_response(Req, 200, [
- % send a plaintext response
{"Content-Type", "text/plain; charset=utf-8"},
- {"Content-Length", integer_to_list(length(Data))}
+ {"Content-Length", integer_to_list(length(Msgs))}
]),
- send_chunk(Resp,Data),
+ send_chunk(Resp,Msgs),
last_chunk(Resp);
handle_rexi_calls_req(#httpd{method='PUT'}=Req) ->
ok = couch_httpd:verify_is_server_admin(Req),
Please sign in to comment.
Something went wrong with that request. Please try again.