diff --git a/src/tsung/ts_digest.erl b/src/tsung/ts_digest.erl index e12d979b..38105c6f 100644 --- a/src/tsung/ts_digest.erl +++ b/src/tsung/ts_digest.erl @@ -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. %%% ---------------------------------------------------------------------- diff --git a/src/tsung/ts_http.erl b/src/tsung/ts_http.erl index 5bd7e2c1..0526c0e2 100644 --- a/src/tsung/ts_http.erl +++ b/src/tsung/ts_http.erl @@ -315,7 +315,7 @@ decode_chunk_size(<>, Headers, Body, <<>>) when Hea ?Debug("decode chunk: crlf, no digit"), decode_chunk_size(Data, Headers, Body, <<>>); decode_chunk_size(<>, 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 -> diff --git a/src/tsung/ts_http_common.erl b/src/tsung/ts_http_common.erl index 346751e2..cb924126 100644 --- a/src/tsung/ts_http_common.erl +++ b/src/tsung/ts_http_common.erl @@ -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