[Modify] Polish it
This commit is contained in:
parent
f5ebe3730d
commit
6f42f4ff47
@ -942,7 +942,7 @@ namespace WebSocketSharp
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!uri.IsAbsoluteUri) {
|
if (!uri.IsAbsoluteUri) {
|
||||||
message = "Not an absolute URI.";
|
message = "A relative URI.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -952,17 +952,17 @@ namespace WebSocketSharp
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uri.Fragment.Length > 0) {
|
|
||||||
message = "It includes the fragment component.";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var port = uri.Port;
|
var port = uri.Port;
|
||||||
if (port == 0) {
|
if (port == 0) {
|
||||||
message = "The port part is zero.";
|
message = "The port part is zero.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (uri.Fragment.Length > 0) {
|
||||||
|
message = "It includes the fragment component.";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
result = port != -1
|
result = port != -1
|
||||||
? uri
|
? uri
|
||||||
: new Uri (
|
: new Uri (
|
||||||
|
Loading…
Reference in New Issue
Block a user