Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace httpd_util functions removed in OTP26 #409

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/tsung/ts_digest.erl
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ shahex(Clear) ->
%%%----------------------------------------------------------------------
tohex(A)->
Fun = fun(X)->
ts_utils:to_lower(padhex(httpd_util:integer_to_hexlist(X)))
ts_utils:to_lower(padhex(erlang:integer_to_list(X, 16)))
end,
lists:flatten( lists:map(Fun, A) ).

%%%----------------------------------------------------------------------
%%% Func: padhex/1
%%% Purpose: needed because httpd_util:integer_to_hexlist returns hex
%%% Purpose: needed because erlang:integer_to_list(X, 16) returns hex
%%% values <10 as only 1 character, ie. "0F" is simply returned as
%%% "F". For our digest, we need these leading zeros to be present.
%%% ----------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/tsung/ts_http.erl
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ decode_chunk_size(<<Head:2/binary, Data/binary >>, Headers, Body, <<>>) when Hea
?Debug("decode chunk: crlf, no digit"),
decode_chunk_size(Data, Headers, Body, <<>>);
decode_chunk_size(<<Head:2/binary, Data/binary >>, Headers, Body,Digits) when Head == << "\r\n" >> ->
case httpd_util:hexlist_to_integer(binary_to_list(Digits)) of
case erlang:list_to_integer(binary_to_list(Digits), 16) of
0 ->
decode_chunk_size(Data, Headers, Body ,<<>>);
Size ->
Expand Down
2 changes: 1 addition & 1 deletion src/tsung/ts_http_common.erl
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ parse_chunked(Body, State)->
%%----------------------------------------------------------------------
read_chunk(<<>>, State, Int, Acc) ->
?LOGF("No data in chunk [Int=~p, Acc=~p] ~n", [Int,Acc],?INFO),
AccInt = list_to_binary(httpd_util:integer_to_hexlist(Int)),
AccInt = list_to_binary(erlang:integer_to_list(Int, 16)),
{ State#state_rcv{acc = AccInt, ack_done = false }, [] }; % read more data
%% this code has been inspired by inets/http_lib.erl
%% Extensions not implemented
Expand Down