File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ public class SecurityUtils
7878 /// Number of the very first index in an array or a string.
7979 /// </summary>
8080 private const int INDEX_FIRST = 0 ;
81+
82+ /// <summary>
83+ /// The index after the firts character in a string.
84+ /// </summary>
85+ private const int INDEX_LAST_FIRST_CHAR = 1 ;
8186
8287 /// <summary>
8388 /// Regex constants.
@@ -136,7 +141,7 @@ private static string GenerateRequestHeadersSortedString(HttpRequestMessage requ
136141 private static string GetHeaderNameCorrectyCased ( string headerName )
137142 {
138143 headerName = headerName . ToLower ( ) ;
139- headerName = headerName . First ( ) . ToString ( ) . ToUpper ( ) + headerName . Substring ( 1 ) ;
144+ headerName = headerName . First ( ) . ToString ( ) . ToUpper ( ) + headerName . Substring ( INDEX_LAST_FIRST_CHAR ) ;
140145 var matches = Regex . Matches ( headerName , REGEX_FOR_LOWERCASE_HEADERS ) ;
141146
142147 return matches . Cast < Match > ( ) . Aggregate (
You can’t perform that action at this time.
0 commit comments