Skip to content

Commit

Permalink
Merge pull request #69 from nathanaschbacher/master
Browse files Browse the repository at this point in the history
Updated http_raw driver to allow appending custom headers.
  • Loading branch information
slfritchie committed Apr 9, 2013
2 parents f2641a4 + 041b1a7 commit 68bc174
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions examples/httpraw.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

{driver, basho_bench_driver_http_raw}.

%% Example custom headers. Beware using headers that may cause collisions
%% with automatically generated headers used by other parts of the driver.
%% {http_raw_append_headers, [{"Authorization", "Basic dXNlcm5hbWU6cGFzc3dvcmQ="}]}.

%% Example syntax (mykeygen_seq is not defined)
%% {key_generator, {function, test, mykeygen_seq, [10000, 10, 10, 100]}}.

Expand Down
2 changes: 1 addition & 1 deletion src/basho_bench_driver_http_raw.erl
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ send_request(Url, Headers, Method, Body, Options, Count) ->
SSLOpts when is_list(SSLOpts) ->
[{is_ssl, true}, {ssl_options, SSLOpts} | Options]
end,
case catch(ibrowse_http_client:send_req(Pid, Url, Headers, Method, Body, Options2, basho_bench_config:get(http_raw_request_timeout, 5000))) of
case catch(ibrowse_http_client:send_req(Pid, Url, Headers ++ basho_bench_config:get(http_raw_append_headers,[]), Method, Body, Options2, basho_bench_config:get(http_raw_request_timeout, 5000))) of
{ok, Status, RespHeaders, RespBody} ->
maybe_disconnect(Url),
{ok, Status, RespHeaders, RespBody};
Expand Down

0 comments on commit 68bc174

Please sign in to comment.