Skip to content

Commit

Permalink
Merge pull request #34 from team-alembic/fix-content-length
Browse files Browse the repository at this point in the history
Calculate the content-length correctly
  • Loading branch information
dkataskin authored Dec 3, 2021
2 parents c6d74d7 + d129d79 commit cd602d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/erlazure_http.erl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ construct_url(ReqContext = #req_context{}) ->
lists:foldl(FoldFun, "", ReqContext#req_context.parameters).

get_content_length(Content) when is_list(Content) ->
lists:flatlength(Content);
erlang:iolist_size(Content);

get_content_length(Content) when is_binary(Content) ->
byte_size(Content).
byte_size(Content).

0 comments on commit cd602d4

Please sign in to comment.