[Modify] Polish it

This commit is contained in:
sta 2019-11-26 20:52:31 +09:00
parent 13a20f45da
commit 50084de4b0

View File

@ -219,7 +219,12 @@ namespace WebSocketSharp.Net
if (_disposed)
throw new ObjectDisposedException (GetType ().ToString ());
if (value != null && value.Length == 0)
if (value == null) {
_contentType = null;
return;
}
if (value.Length == 0)
throw new ArgumentException ("An empty string.", "value");
_contentType = value;