From 125fe147c84ee841e74aff0245cad1a0a083b1ed Mon Sep 17 00:00:00 2001 From: Eugene Girshov Date: Mon, 3 Jun 2013 22:37:01 +0300 Subject: [PATCH] fix tracing request body if source is a function --- src/ibrowse_http_client.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ibrowse_http_client.erl b/src/ibrowse_http_client.erl index b014e92..eae341b 100644 --- a/src/ibrowse_http_client.erl +++ b/src/ibrowse_http_client.erl @@ -1926,5 +1926,7 @@ trace_request_body(Body) -> ok end. +to_binary({X, _}) when is_function(X) -> to_binary(X); +to_binary(X) when is_function(X) -> <<"body generated by function">>; to_binary(X) when is_list(X) -> list_to_binary(X); to_binary(X) when is_binary(X) -> X.