[Modify] Rename it
This commit is contained in:
parent
8064569d41
commit
dfa8c0b248
@ -72,8 +72,8 @@ namespace WebSocketSharp.Net
|
|||||||
private WebHeaderCollection _headers;
|
private WebHeaderCollection _headers;
|
||||||
private bool _headersSent;
|
private bool _headersSent;
|
||||||
private bool _keepAlive;
|
private bool _keepAlive;
|
||||||
private Uri _location;
|
|
||||||
private ResponseStream _outputStream;
|
private ResponseStream _outputStream;
|
||||||
|
private Uri _redirectLocation;
|
||||||
private bool _sendChunked;
|
private bool _sendChunked;
|
||||||
private int _statusCode;
|
private int _statusCode;
|
||||||
private string _statusDescription;
|
private string _statusDescription;
|
||||||
@ -179,8 +179,8 @@ namespace WebSocketSharp.Net
|
|||||||
headers.InternalSet ("Connection", "keep-alive", true);
|
headers.InternalSet ("Connection", "keep-alive", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_location != null)
|
if (_redirectLocation != null)
|
||||||
headers.InternalSet ("Location", _location.AbsoluteUri, true);
|
headers.InternalSet ("Location", _redirectLocation.AbsoluteUri, true);
|
||||||
|
|
||||||
if (_cookies != null) {
|
if (_cookies != null) {
|
||||||
foreach (var cookie in _cookies) {
|
foreach (var cookie in _cookies) {
|
||||||
@ -572,7 +572,9 @@ namespace WebSocketSharp.Net
|
|||||||
/// </exception>
|
/// </exception>
|
||||||
public string RedirectLocation {
|
public string RedirectLocation {
|
||||||
get {
|
get {
|
||||||
return _location != null ? _location.OriginalString : null;
|
return _redirectLocation != null
|
||||||
|
? _redirectLocation.OriginalString
|
||||||
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
set {
|
set {
|
||||||
@ -585,7 +587,7 @@ namespace WebSocketSharp.Net
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
_location = null;
|
_redirectLocation = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,7 +598,7 @@ namespace WebSocketSharp.Net
|
|||||||
if (!Uri.TryCreate (value, UriKind.Absolute, out uri))
|
if (!Uri.TryCreate (value, UriKind.Absolute, out uri))
|
||||||
throw new ArgumentException ("Not an absolute URL.", "value");
|
throw new ArgumentException ("Not an absolute URL.", "value");
|
||||||
|
|
||||||
_location = uri;
|
_redirectLocation = uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1020,7 +1022,7 @@ namespace WebSocketSharp.Net
|
|||||||
if (!Uri.TryCreate (url, UriKind.Absolute, out uri))
|
if (!Uri.TryCreate (url, UriKind.Absolute, out uri))
|
||||||
throw new ArgumentException ("Not an absolute URL.", "url");
|
throw new ArgumentException ("Not an absolute URL.", "url");
|
||||||
|
|
||||||
_location = uri;
|
_redirectLocation = uri;
|
||||||
_statusCode = 302;
|
_statusCode = 302;
|
||||||
_statusDescription = "Found";
|
_statusDescription = "Found";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user