File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 33
33
)
34
34
from botocore .model import StructureShape
35
35
from botocore .response import StreamingBody
36
- from botocore .utils import determine_content_length , has_checksum_header
36
+ from botocore .utils import (
37
+ conditionally_calculate_md5 ,
38
+ determine_content_length ,
39
+ has_checksum_header ,
40
+ )
37
41
38
42
if HAS_CRT :
39
43
from awscrt import checksums as crt_checksums
@@ -354,7 +358,10 @@ def apply_request_checksum(request):
354
358
if not algorithm :
355
359
return
356
360
357
- if algorithm ["in" ] == "header" :
361
+ if algorithm == "conditional-md5" :
362
+ # Special case to handle the http checksum required trait
363
+ conditionally_calculate_md5 (request )
364
+ elif algorithm ["in" ] == "header" :
358
365
_apply_request_header_checksum (request )
359
366
elif algorithm ["in" ] == "trailer" :
360
367
_apply_request_trailer_checksum (request )
You can’t perform that action at this time.
0 commit comments