[Modify] Polish it
This commit is contained in:
parent
6295f62349
commit
c6e1c936b2
@ -711,6 +711,7 @@ namespace WebSocketSharp.Net
|
|||||||
}
|
}
|
||||||
else if (requestUri.MaybeUri ()) {
|
else if (requestUri.MaybeUri ()) {
|
||||||
Uri uri;
|
Uri uri;
|
||||||
|
|
||||||
if (!Uri.TryCreate (requestUri, UriKind.Absolute, out uri))
|
if (!Uri.TryCreate (requestUri, UriKind.Absolute, out uri))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
@ -729,6 +730,7 @@ namespace WebSocketSharp.Net
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// As the authority form.
|
// As the authority form.
|
||||||
|
|
||||||
host = requestUri;
|
host = requestUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -742,8 +744,8 @@ namespace WebSocketSharp.Net
|
|||||||
host = String.Format ("{0}:{1}", host, secure ? 443 : 80);
|
host = String.Format ("{0}:{1}", host, secure ? 443 : 80);
|
||||||
|
|
||||||
var url = String.Format ("{0}://{1}{2}", schm, host, path);
|
var url = String.Format ("{0}://{1}{2}", schm, host, path);
|
||||||
|
|
||||||
Uri ret;
|
Uri ret;
|
||||||
|
|
||||||
return Uri.TryCreate (url, UriKind.Absolute, out ret) ? ret : null;
|
return Uri.TryCreate (url, UriKind.Absolute, out ret) ? ret : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user