Skip to content

Commit 87926ad

Browse files
committed
Consistent supports
1 parent bc4b715 commit 87926ad

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/AngleSharp.Io/Network/AboutRequester.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public Task<IResponse> RequestAsync(IRequest request, CancellationToken cancel)
6969
/// <returns>True if the protocol is supported, otherwise false.</returns>
7070
public Boolean SupportsProtocol(String protocol)
7171
{
72-
return !String.IsNullOrEmpty(protocol) && protocol.Equals("about");
72+
return protocol.Equals("about", StringComparison.OrdinalIgnoreCase);
7373
}
7474

7575
private static String GetAddress(String data)

src/AngleSharp.Io/Network/FileRequester.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public async Task<IResponse> RequestAsync(IRequest request, CancellationToken ca
4545
/// <returns>True if the protocol is supported, otherwise false.</returns>
4646
public Boolean SupportsProtocol(String protocol)
4747
{
48-
return !String.IsNullOrEmpty(protocol) && protocol.Equals(ProtocolNames.File);
48+
return protocol.Equals(ProtocolNames.File, StringComparison.OrdinalIgnoreCase);
4949
}
5050
}
5151
}

src/AngleSharp.Io/Network/FtpRequester.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public async Task<IResponse> RequestAsync(IRequest request, CancellationToken ca
4848
/// <returns>True if the protocol is supported, otherwise false.</returns>
4949
public Boolean SupportsProtocol(String protocol)
5050
{
51-
return !String.IsNullOrEmpty(protocol) && protocol.Equals(ProtocolNames.Ftp);
51+
return protocol.Equals(ProtocolNames.Ftp, StringComparison.OrdinalIgnoreCase);
5252
}
5353
}
5454
}

0 commit comments

Comments
 (0)