Refactored a few for HttpListenerRequest.cs
This commit is contained in:
parent
236846a7c3
commit
f8758c61e6
@ -126,8 +126,7 @@ namespace WebSocketSharp.Net
|
|||||||
/// </value>
|
/// </value>
|
||||||
public int ClientCertificateError {
|
public int ClientCertificateError {
|
||||||
get {
|
get {
|
||||||
// TODO: Always returns 0.
|
return 0; // TODO: Always returns 0.
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -356,8 +355,7 @@ namespace WebSocketSharp.Net
|
|||||||
/// </value>
|
/// </value>
|
||||||
public string RawUrl {
|
public string RawUrl {
|
||||||
get {
|
get {
|
||||||
// TODO: Should decode?
|
return _url.PathAndQuery; // TODO: Should decode?
|
||||||
return _url.PathAndQuery;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -534,13 +532,13 @@ namespace WebSocketSharp.Net
|
|||||||
internal void FinishInitialization ()
|
internal void FinishInitialization ()
|
||||||
{
|
{
|
||||||
var host = _headers["Host"];
|
var host = _headers["Host"];
|
||||||
var noHost = host == null || host.Length == 0;
|
var nohost = host == null || host.Length == 0;
|
||||||
if (_version > HttpVersion.Version10 && noHost) {
|
if (_version > HttpVersion.Version10 && nohost) {
|
||||||
_context.ErrorMessage = "Invalid Host header";
|
_context.ErrorMessage = "Invalid Host header";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (noHost)
|
if (nohost)
|
||||||
host = UserHostAddress;
|
host = UserHostAddress;
|
||||||
|
|
||||||
_url = HttpUtility.CreateRequestUrl (_uri, host, IsWebSocketRequest, IsSecureConnection);
|
_url = HttpUtility.CreateRequestUrl (_uri, host, IsWebSocketRequest, IsSecureConnection);
|
||||||
|
Loading…
Reference in New Issue
Block a user