diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs
index 8f10681e..6f47c93f 100644
--- a/websocket-sharp/WebSocket.cs
+++ b/websocket-sharp/WebSocket.cs
@@ -289,6 +289,34 @@ namespace WebSocketSharp
}
}
+ ///
+ /// Gets or sets a value indicating whether the redirects to
+ /// the new URL located in the handshake response.
+ ///
+ ///
+ /// true if the redirects to the new URL;
+ /// otherwise, false. The default value is false.
+ ///
+ 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;
+ }
+ }
+ }
+
///
/// Gets the WebSocket extensions selected by the server.
///