diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index bf72b703..2adbe7de 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -895,6 +895,12 @@ namespace WebSocketSharp return ret.Length > 0 ? ret : "/"; } + internal static string TrimSlashOrBackslashFromEnd (this string value) + { + var ret = value.TrimEnd ('/', '\\'); + return ret.Length > 0 ? ret : value[0].ToString (); + } + /// /// Tries to create a new for WebSocket with /// the specified .