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(
7474 ):
7575 values = values if isinstance (values , (list , tuple )) else [values ]
7676 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
7878 ])
7979
8080 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):
692692 reader = LimitedRandomReader (length )
693693 log_entry ["args" ]["data" ] = "LimitedRandomReader(11 * MB)"
694694 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+ }
696701 log_entry ["args" ]["content_type" ] = content_type = (
697702 "application/octet-stream" )
698703 log_entry ["args" ]["object_name" ] = object_name + "-metadata"
You can’t perform that action at this time.
0 commit comments