File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Libraries/src/Amazon.Lambda.RuntimeSupport/Client Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -45,18 +45,14 @@ public RuntimeApiHeaders(Dictionary<string, IEnumerable<string>> headers)
4545
4646 private string GetHeaderValueRequired ( Dictionary < string , IEnumerable < string > > headers , string header )
4747 {
48- return headers [ header ] . FirstOrDefault ( ) ;
48+ var headerKey = headers . Keys . FirstOrDefault ( k => string . Equals ( k , header , StringComparison . OrdinalIgnoreCase ) ) ;
49+ return headers [ headerKey ] . FirstOrDefault ( ) ;
4950 }
5051
5152 private string GetHeaderValueOrNull ( Dictionary < string , IEnumerable < string > > headers , string header )
5253 {
53- if ( headers . TryGetValue ( header , out var values ) )
54- {
55- return values . FirstOrDefault ( ) ;
56- }
57-
58- return null ;
54+ var headerKey = headers . Keys . FirstOrDefault ( k => string . Equals ( k , header , StringComparison . OrdinalIgnoreCase ) ) ;
55+ return headers [ headerKey ] . FirstOrDefault ( ) ;
5956 }
6057 }
61-
6258}
You can’t perform that action at this time.
0 commit comments