[Modify] Polish it
This commit is contained in:
parent
aabb286f42
commit
0cd5632544
@ -291,25 +291,22 @@ namespace WebSocketSharp.Net
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cookie != null)
|
if (cookie != null) {
|
||||||
ret.Add (cookie);
|
ret.Add (cookie);
|
||||||
|
cookie = null;
|
||||||
string name = null;
|
}
|
||||||
string val = String.Empty;
|
|
||||||
|
|
||||||
var idx = pair.IndexOf ('=');
|
var idx = pair.IndexOf ('=');
|
||||||
if (idx == -1) {
|
if (idx == -1)
|
||||||
name = pair;
|
continue;
|
||||||
}
|
|
||||||
else if (idx == pair.Length - 1) {
|
|
||||||
name = pair.Substring (0, idx).TrimEnd (' ');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
name = pair.Substring (0, idx).TrimEnd (' ');
|
|
||||||
val = pair.Substring (idx + 1).TrimStart (' ');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (idx == pair.Length - 1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
var name = pair.Substring (0, idx).TrimEnd (' ');
|
||||||
|
var val = pair.Substring (idx + 1).TrimStart (' ');
|
||||||
cookie = new Cookie (name, val);
|
cookie = new Cookie (name, val);
|
||||||
|
|
||||||
if (ver != 0)
|
if (ver != 0)
|
||||||
cookie.Version = ver;
|
cookie.Version = ver;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user