[Modify] Polish it

master
sta 6 years ago
parent 1d14400c0e
commit bb79090408

@ -826,13 +826,20 @@ namespace WebSocketSharp.Net
if (_state == HttpHeaderType.Unspecified) if (_state == HttpHeaderType.Unspecified)
return; return;
if (response && _state == HttpHeaderType.Request) if (response) {
throw new InvalidOperationException ( if (_state == HttpHeaderType.Response)
"This collection has already been used to store the request headers."); return;
var msg = "This collection has already been used for the request headers.";
throw new InvalidOperationException (msg);
}
if (_state == HttpHeaderType.Response) {
var msg = "This collection has already been used for the response headers.";
if (!response && _state == HttpHeaderType.Response) throw new InvalidOperationException (msg);
throw new InvalidOperationException ( }
"This collection has already been used to store the response headers.");
} }
private static string checkValue (string value) private static string checkValue (string value)

Loading…
Cancel
Save