[Modify] Replace it
This commit is contained in:
parent
1230d354a0
commit
4223d1ced9
@ -683,9 +683,15 @@ namespace WebSocketSharp.Net
|
||||
}
|
||||
|
||||
set {
|
||||
string msg;
|
||||
if (!canSetValue (value, out msg))
|
||||
throw new CookieException (msg);
|
||||
if (value == null)
|
||||
throw new ArgumentNullException ("value");
|
||||
|
||||
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 : "\"\"";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user