Skip to content

Commit ebe5092

Browse files
authored
Merge pull request #409 from lyokha/httpd_util_otp26
replace httpd_util functions removed in OTP26
2 parents 9b36b13 + 12eda11 commit ebe5092

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/tsung/ts_digest.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ shahex(Clear) ->
7272
%%%----------------------------------------------------------------------
7373
tohex(A)->
7474
Fun = fun(X)->
75-
ts_utils:to_lower(padhex(httpd_util:integer_to_hexlist(X)))
75+
ts_utils:to_lower(padhex(erlang:integer_to_list(X, 16)))
7676
end,
7777
lists:flatten( lists:map(Fun, A) ).
7878

7979
%%%----------------------------------------------------------------------
8080
%%% Func: padhex/1
81-
%%% Purpose: needed because httpd_util:integer_to_hexlist returns hex
81+
%%% Purpose: needed because erlang:integer_to_list(X, 16) returns hex
8282
%%% values <10 as only 1 character, ie. "0F" is simply returned as
8383
%%% "F". For our digest, we need these leading zeros to be present.
8484
%%% ----------------------------------------------------------------------

src/tsung/ts_http.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ decode_chunk_size(<<Head:2/binary, Data/binary >>, Headers, Body, <<>>) when Hea
315315
?Debug("decode chunk: crlf, no digit"),
316316
decode_chunk_size(Data, Headers, Body, <<>>);
317317
decode_chunk_size(<<Head:2/binary, Data/binary >>, Headers, Body,Digits) when Head == << "\r\n" >> ->
318-
case httpd_util:hexlist_to_integer(binary_to_list(Digits)) of
318+
case erlang:list_to_integer(binary_to_list(Digits), 16) of
319319
0 ->
320320
decode_chunk_size(Data, Headers, Body ,<<>>);
321321
Size ->

src/tsung/ts_http_common.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ parse_chunked(Body, State)->
405405
%%----------------------------------------------------------------------
406406
read_chunk(<<>>, State, Int, Acc) ->
407407
?LOGF("No data in chunk [Int=~p, Acc=~p] ~n", [Int,Acc],?INFO),
408-
AccInt = list_to_binary(httpd_util:integer_to_hexlist(Int)),
408+
AccInt = list_to_binary(erlang:integer_to_list(Int, 16)),
409409
{ State#state_rcv{acc = AccInt, ack_done = false }, [] }; % read more data
410410
%% this code has been inspired by inets/http_lib.erl
411411
%% Extensions not implemented

0 commit comments

Comments
 (0)