File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ def _get_canonical_headers(
74
74
):
75
75
values = values if isinstance (values , (list , tuple )) else [values ]
76
76
ordered_headers [key ] = "," .join ([
77
- _MULTI_SPACE_REGEX .sub (" " , value ) for value in values
77
+ _MULTI_SPACE_REGEX .sub (" " , value ). strip () for value in values
78
78
])
79
79
80
80
ordered_headers = OrderedDict (sorted (ordered_headers .items ()))
Original file line number Diff line number Diff line change @@ -692,7 +692,12 @@ def test_put_object(log_entry, sse=None):
692
692
reader = LimitedRandomReader (length )
693
693
log_entry ["args" ]["data" ] = "LimitedRandomReader(11 * MB)"
694
694
log_entry ["args" ]["metadata" ] = metadata = {
695
- 'x-amz-meta-testing' : 'value' , 'test-key' : 'value2' }
695
+ 'x-amz-meta-testing' : 'value' ,
696
+ 'test-key' : 'value2' ,
697
+ "My-Project" : "Project One" ,
698
+ "My-header1" : " a b c " ,
699
+ "My-Header2" : "\" a b c\" " ,
700
+ }
696
701
log_entry ["args" ]["content_type" ] = content_type = (
697
702
"application/octet-stream" )
698
703
log_entry ["args" ]["object_name" ] = object_name + "-metadata"
You can’t perform that action at this time.
0 commit comments