Skip to content

Commit

Permalink
Cosmetic.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyg committed May 15, 2012
1 parent 4ac63e3 commit a5e7ad7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/rfc4627_jsonrpc_inets.erl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -161,10 +161,8 @@ do_rpc(#mod{init_data = #init_data{peername = {PeerPort, PeerName}},
{ok, ResultEnc, ResponseInfo} -> {ok, ResultEnc, ResponseInfo} ->
{obj, ResponseHeaderFields} = {obj, ResponseHeaderFields} =
rfc4627:get_field(ResponseInfo, "http_headers", {obj, []}), rfc4627:get_field(ResponseInfo, "http_headers", {obj, []}),

StatusCode =
StatusCode =
rfc4627:get_field(ResponseInfo, "http_status_code", 200), rfc4627:get_field(ResponseInfo, "http_status_code", 200),

Headers = [{K, binary_to_list(V)} || {K,V} <- ResponseHeaderFields], Headers = [{K, binary_to_list(V)} || {K,V} <- ResponseHeaderFields],
{proceed, [{response, {response, {proceed, [{response, {response,
[{code, StatusCode}, [{code, StatusCode},
Expand Down
4 changes: 1 addition & 3 deletions src/rfc4627_jsonrpc_mochiweb.erl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -110,10 +110,8 @@ handle(AliasPrefix, Req) ->
end, end,
{obj, ResponseHeaderFields} = {obj, ResponseHeaderFields} =
rfc4627:get_field(ResponseInfo, "http_headers", {obj, []}), rfc4627:get_field(ResponseInfo, "http_headers", {obj, []}),

StatusCode =
StatusCode =
rfc4627:get_field(ResponseInfo, "http_status_code", 200), rfc4627:get_field(ResponseInfo, "http_status_code", 200),

Headers = [{K, binary_to_list(V)} || {K,V} <- ResponseHeaderFields], Headers = [{K, binary_to_list(V)} || {K,V} <- ResponseHeaderFields],
{ok, {StatusCode, Headers ++ [{"Content-type", RespType}], ResultEnc}} {ok, {StatusCode, Headers ++ [{"Content-type", RespType}], ResultEnc}}
end. end.

0 comments on commit a5e7ad7

Please sign in to comment.