add debug

This commit is contained in:
anlicheng 2026-04-27 16:08:20 +08:00
parent d353cf8bef
commit 9f5ad1c646

View File

@ -21,8 +21,8 @@ init(Req0, Opts = [Mod|_]) ->
try Mod:handle_request(Method, Path, GetParams, PostParams) of try Mod:handle_request(Method, Path, GetParams, PostParams) of
{ok, StatusCode, Resp} -> {ok, StatusCode, Resp} ->
%logger:debug("[http_protocol] request path: ~p, get_params: ~p, post_params: ~p, response: ~ts", logger:debug("[http_protocol] request path: ~p, get_params: ~p, post_params: ~p, response: ~ts",
% [Path, GetParams, PostParams, Resp]), [Path, GetParams, PostParams, Resp]),
AcceptEncoding = cowboy_req:header(<<"accept-encoding">>, Req1, <<>>), AcceptEncoding = cowboy_req:header(<<"accept-encoding">>, Req1, <<>>),
Req2 = case iolist_size(Resp) >= 1024 andalso supported_gzip(AcceptEncoding) of Req2 = case iolist_size(Resp) >= 1024 andalso supported_gzip(AcceptEncoding) of
true -> true ->