diff --git a/src/dev_codec_httpsig_conv.erl b/src/dev_codec_httpsig_conv.erl index 5a0db779b..b652a1582 100644 --- a/src/dev_codec_httpsig_conv.erl +++ b/src/dev_codec_httpsig_conv.erl @@ -77,7 +77,10 @@ from(HTTP, _Req, Opts) -> hb_maps:without( Removed = hb_maps:keys(Commitments) ++ - [<<"content-digest">>] ++ + case hb_message:is_signed_key(<<"content-digest">>, MsgWithSigs, Opts) of + true -> []; + false -> [<<"content-digest">>] + end ++ case maps:get(<<"content-type">>, MsgWithSigs, undefined) of <<"multipart/", _/binary>> -> [<<"content-type">>]; _ -> []