Removed checking if an empty string from the Ext.TryCreateWebSocketUri method
This commit is contained in:
parent
7f01d41679
commit
47931c9a42
@ -852,10 +852,6 @@ namespace WebSocketSharp
|
||||
this string uriString, out Uri result, out string message)
|
||||
{
|
||||
result = null;
|
||||
if (uriString.Length == 0) {
|
||||
message = "An empty string.";
|
||||
return false;
|
||||
}
|
||||
|
||||
var uri = uriString.ToUri ();
|
||||
if (!uri.IsAbsoluteUri) {
|
||||
|
@ -144,6 +144,9 @@ namespace WebSocketSharp.Server
|
||||
if (url == null)
|
||||
throw new ArgumentNullException ("url");
|
||||
|
||||
if (url.Length == 0)
|
||||
throw new ArgumentException ("An empty string.", "url");
|
||||
|
||||
string msg;
|
||||
if (!tryCreateUri (url, out _uri, out msg))
|
||||
throw new ArgumentException (msg, "url");
|
||||
|
@ -180,6 +180,9 @@ namespace WebSocketSharp
|
||||
if (url == null)
|
||||
throw new ArgumentNullException ("url");
|
||||
|
||||
if (url.Length == 0)
|
||||
throw new ArgumentException ("An empty string.", "url");
|
||||
|
||||
string msg;
|
||||
if (!url.TryCreateWebSocketUri (out _uri, out msg))
|
||||
throw new ArgumentException (msg, "url");
|
||||
|
Loading…
Reference in New Issue
Block a user