[Modify] Polish it
This commit is contained in:
parent
2bfaa0422c
commit
d82d95c56f
@ -175,8 +175,9 @@ namespace WebSocketSharp.Net
|
||||
}
|
||||
|
||||
var host = uriPrefix.IndexOf (':') + 3;
|
||||
var end = len - 1;
|
||||
|
||||
if (host >= len) {
|
||||
if (host > end) {
|
||||
var msg = "No host is specified.";
|
||||
|
||||
throw new ArgumentException (msg, "uriPrefix");
|
||||
@ -196,7 +197,7 @@ namespace WebSocketSharp.Net
|
||||
throw new ArgumentException (msg, "uriPrefix");
|
||||
}
|
||||
|
||||
if (uriPrefix[len - 1] != '/') {
|
||||
if (uriPrefix[end] != '/') {
|
||||
var msg = "It ends without '/'.";
|
||||
|
||||
throw new ArgumentException (msg, "uriPrefix");
|
||||
|
Loading…
Reference in New Issue
Block a user