[Modify] Polish it
This commit is contained in:
parent
7a4ceaea8e
commit
a36b0b7503
@ -817,11 +817,11 @@ namespace WebSocketSharp.Net
|
|||||||
internal static Encoding GetEncoding (string contentType)
|
internal static Encoding GetEncoding (string contentType)
|
||||||
{
|
{
|
||||||
var name = "charset=";
|
var name = "charset=";
|
||||||
var comparison = StringComparison.OrdinalIgnoreCase;
|
var compType = StringComparison.OrdinalIgnoreCase;
|
||||||
|
|
||||||
foreach (var elm in contentType.SplitHeaderValue (';')) {
|
foreach (var elm in contentType.SplitHeaderValue (';')) {
|
||||||
var part = elm.Trim ();
|
var part = elm.Trim ();
|
||||||
if (part.IndexOf (name, comparison) != 0)
|
if (part.IndexOf (name, compType) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var val = part.GetValue ('=', true);
|
var val = part.GetValue ('=', true);
|
||||||
|
Loading…
Reference in New Issue
Block a user