Skip to content

Commit

Permalink
Merge pull request #72 from surik/case_sensetive_http
Browse files Browse the repository at this point in the history
Temporary fix for compatibility with legacy LUA http-jsonrpc server (revert headers name changes)
  • Loading branch information
liveforeverx committed Sep 4, 2015
2 parents 5999385 + f5bba34 commit a1d0b03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transports/hello_http_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ content_type(Signarute) ->
http_send(Client, Request, Signarute, State = #http_state{url = URL, options = Options}) ->
#http_options{method = Method, ib_opts = Opts} = Options,
{ok, Vsn} = application:get_key(hello, vsn),
Headers = [{<<"content-type">>, content_type(Signarute)},
{<<"accept">>, content_type(Signarute)},
{<<"user-agent">>, <<"hello/", (list_to_binary(Vsn))/binary>>}],
Headers = [{<<"Content-Type">>, content_type(Signarute)},
{<<"Accept">>, content_type(Signarute)},
{<<"User-Agent">>, <<"hello/", (list_to_binary(Vsn))/binary>>}],
case hackney:Method(URL, Headers, Request, Opts) of
{ok, Success, RespHeaders, ClientRef} when Success =:= 200; Success =:= 201; Success =:= 202 ->
{ok, Body} = hackney:body(ClientRef),
Expand Down

0 comments on commit a1d0b03

Please sign in to comment.