[Modify] Replace it
This commit is contained in:
parent
1230d354a0
commit
4223d1ced9
@ -683,9 +683,15 @@ namespace WebSocketSharp.Net
|
|||||||
}
|
}
|
||||||
|
|
||||||
set {
|
set {
|
||||||
string msg;
|
if (value == null)
|
||||||
if (!canSetValue (value, out msg))
|
throw new ArgumentNullException ("value");
|
||||||
throw new CookieException (msg);
|
|
||||||
|
if (value.Contains (_reservedCharsForValue)) {
|
||||||
|
if (!value.IsEnclosedIn ('"')) {
|
||||||
|
var msg = "A string not enclosed in double quotes.";
|
||||||
|
throw new ArgumentException (msg, "value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_value = value.Length > 0 ? value : "\"\"";
|
_value = value.Length > 0 ? value : "\"\"";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user