Fix for issue #42, enable redirection to the new url located in the handshake response
This commit is contained in:
parent
072ad21481
commit
94c26e6107
@ -289,6 +289,34 @@ namespace WebSocketSharp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether the <see cref="WebSocket"/> redirects to
|
||||||
|
/// the new URL located in the handshake response.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>
|
||||||
|
/// <c>true</c> if the <see cref="WebSocket"/> redirects to the new URL;
|
||||||
|
/// otherwise, <c>false</c>. The default value is <c>false</c>.
|
||||||
|
/// </value>
|
||||||
|
public bool EnableRedirection {
|
||||||
|
get {
|
||||||
|
return _enableRedirection;
|
||||||
|
}
|
||||||
|
|
||||||
|
set {
|
||||||
|
lock (_forConn) {
|
||||||
|
var msg = checkIfAvailable (false, false);
|
||||||
|
if (msg != null) {
|
||||||
|
_logger.Error (msg);
|
||||||
|
error ("An error has occurred in setting the enable redirection.", null);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_enableRedirection = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the WebSocket extensions selected by the server.
|
/// Gets the WebSocket extensions selected by the server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user