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)
45
45
46
46
private string GetHeaderValueRequired ( Dictionary < string , IEnumerable < string > > headers , string header )
47
47
{
48
- return headers [ header ] . FirstOrDefault ( ) ;
48
+ var headerKey = headers . Keys . FirstOrDefault ( k => string . Equals ( k , header , StringComparison . OrdinalIgnoreCase ) ) ;
49
+ return headers [ headerKey ] . FirstOrDefault ( ) ;
49
50
}
50
51
51
52
private string GetHeaderValueOrNull ( Dictionary < string , IEnumerable < string > > headers , string header )
52
53
{
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 ( ) ;
59
56
}
60
57
}
61
-
62
58
}
You can’t perform that action at this time.
0 commit comments