Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Commit 0ef9636

Browse files
committed
Added OrdinalIgnoreCase to string.Equals
1 parent dfca389 commit 0ef9636

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Microsoft.AspNet.Http/FormFileCollection.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4+
using System;
45
using System.Collections.Generic;
56

67
namespace Microsoft.AspNet.Http.Internal
@@ -13,7 +14,7 @@ public IFormFile GetFile(string name)
1314
{
1415
foreach (var file in this)
1516
{
16-
if (string.Equals(name, file.Name))
17+
if (string.Equals(name, file.Name, StringComparison.OrdinalIgnoreCase))
1718
{
1819
return file;
1920
}
@@ -28,7 +29,7 @@ public IReadOnlyList<IFormFile> GetFiles(string name)
2829

2930
foreach (var file in this)
3031
{
31-
if (string.Equals(name, file.Name))
32+
if (string.Equals(name, file.Name, StringComparison.OrdinalIgnoreCase))
3233
{
3334
files.Add(file);
3435
}

0 commit comments

Comments
 (0)