Skip to content

Commit

Permalink
Pass Dialyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Nov 9, 2024
1 parent b0abf88 commit 3dc5c46
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions deps/rabbitmq_amqp1_0/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ rabbitmq_app(
app_description = APP_DESCRIPTION,
app_name = APP_NAME,
beam_files = [":beam_files"],
extra_apps = ["rabbit"],
license_files = [":license_files"],
priv = [":priv"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions deps/rabbitmq_ct_client_helpers/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ rabbitmq_app(
hdrs = [":public_hdrs"],
app_name = "rabbitmq_ct_client_helpers",
beam_files = [":beam_files"],
extra_apps = ["rabbit_common"],
license_files = [":license_files"],
priv = [":priv"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions deps/rabbitmq_ct_helpers/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ rabbitmq_app(
hdrs = [":public_hdrs"],
app_name = "rabbitmq_ct_helpers",
beam_files = [":beam_files"],
extra_apps = ["inet_tcp_proxy"],
license_files = [":license_files"],
priv = [":priv"],
deps = [
Expand Down
5 changes: 3 additions & 2 deletions deps/rabbitmq_management/src/rabbit_mgmt_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,9 @@ do_read_complete_body_with_limit(Req0, Acc, BodySizeLimit) ->

with_decode(Keys, ReqData, Context, Fun) ->
case read_complete_body(ReqData) of
{error, Reason} ->
bad_request(Reason, ReqData, Context);
{error, http_body_limit_exceeded, LimitApplied, BytesRead} ->
rabbit_log:warning("HTTP API: request exceeded maximum allowed payload size (limit: ~tp bytes, payload size: ~tp bytes)", [LimitApplied, BytesRead]),
bad_request("Exceeded HTTP request body size limit", ReqData, Context);
{ok, Body, ReqData1} ->
with_decode(Keys, Body, ReqData1, Context, Fun)
end.
Expand Down
8 changes: 4 additions & 4 deletions deps/rabbitmq_management/src/rabbit_mgmt_wm_definitions.erl
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ all_definitions(ReqData, Context) ->
accept_json(ReqData0, Context) ->
BodySizeLimit = application:get_env(rabbitmq_management, max_http_body_size, ?MANAGEMENT_DEFAULT_HTTP_MAX_BODY_SIZE),
case rabbit_mgmt_util:read_complete_body_with_limit(ReqData0, BodySizeLimit) of
{error, Reason} ->
_ = rabbit_log:warning("HTTP API: uploaded definition file exceeded the maximum request body limit of ~p bytes. "
"Use the 'management.http.max_body_size' key in rabbitmq.conf to increase the limit if necessary", [BodySizeLimit]),
rabbit_mgmt_util:bad_request(Reason, ReqData0, Context);
{error, http_body_limit_exceeded, LimitApplied, BytesRead} ->
_ = rabbit_log:warning("HTTP API: uploaded definition file size (~tp) exceeded the maximum request body limit of ~tp bytes. "
"Use the 'management.http.max_body_size' key in rabbitmq.conf to increase the limit if necessary", [BytesRead, LimitApplied]),
rabbit_mgmt_util:bad_request("Exceeded HTTP request body size limit", ReqData0, Context);
{ok, Body, ReqData} ->
accept(Body, ReqData, Context)
end.
Expand Down

0 comments on commit 3dc5c46

Please sign in to comment.