|
|
|
@ -717,14 +717,12 @@ namespace WebSocketSharp.Net
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (requestUri.MaybeUri ()) {
|
|
|
|
else if (requestUri.MaybeUri ()) {
|
|
|
|
Uri uri;
|
|
|
|
Uri uri;
|
|
|
|
var valid = Uri.TryCreate (requestUri, UriKind.Absolute, out uri)
|
|
|
|
if (!Uri.TryCreate (requestUri, UriKind.Absolute, out uri))
|
|
|
|
&& (
|
|
|
|
return null;
|
|
|
|
(
|
|
|
|
|
|
|
|
(schm = uri.Scheme).StartsWith ("http")
|
|
|
|
schm = uri.Scheme;
|
|
|
|
&& !websocketRequest
|
|
|
|
var valid = (schm.StartsWith ("http") && !websocketRequest)
|
|
|
|
)
|
|
|
|
|| (schm.StartsWith ("ws") && websocketRequest);
|
|
|
|
|| (schm.StartsWith ("ws") && websocketRequest)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!valid)
|
|
|
|
if (!valid)
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
|