[Modify] Rename it
This commit is contained in:
parent
64925eaa9e
commit
2fe5697c0d
@ -905,7 +905,7 @@ namespace WebSocketSharp
|
||||
return BitConverter.ToUInt64 (source.ToHostOrder (sourceOrder), 0);
|
||||
}
|
||||
|
||||
internal static string TrimEndSlash (this string value)
|
||||
internal static string TrimSlashFromEnd (this string value)
|
||||
{
|
||||
var ret = value.TrimEnd ('/');
|
||||
return ret.Length > 0 ? ret : "/";
|
||||
|
@ -285,7 +285,7 @@ namespace WebSocketSharp.Server
|
||||
internal void Add<TBehavior> (string path, Func<TBehavior> initializer)
|
||||
where TBehavior : WebSocketBehavior
|
||||
{
|
||||
path = HttpUtility.UrlDecode (path).TrimEndSlash ();
|
||||
path = HttpUtility.UrlDecode (path).TrimSlashFromEnd ();
|
||||
|
||||
lock (_sync) {
|
||||
WebSocketServiceHost host;
|
||||
@ -315,7 +315,7 @@ namespace WebSocketSharp.Server
|
||||
string path, out WebSocketServiceHost host
|
||||
)
|
||||
{
|
||||
path = HttpUtility.UrlDecode (path).TrimEndSlash ();
|
||||
path = HttpUtility.UrlDecode (path).TrimSlashFromEnd ();
|
||||
|
||||
lock (_sync)
|
||||
return _hosts.TryGetValue (path, out host);
|
||||
@ -323,7 +323,7 @@ namespace WebSocketSharp.Server
|
||||
|
||||
internal bool Remove (string path)
|
||||
{
|
||||
path = HttpUtility.UrlDecode (path).TrimEndSlash ();
|
||||
path = HttpUtility.UrlDecode (path).TrimSlashFromEnd ();
|
||||
|
||||
WebSocketServiceHost host;
|
||||
lock (_sync) {
|
||||
|
Loading…
Reference in New Issue
Block a user