[Modify] Add it
This commit is contained in:
		@@ -44,6 +44,7 @@ using System.IO;
 | 
				
			|||||||
using System.Net.Sockets;
 | 
					using System.Net.Sockets;
 | 
				
			||||||
using System.Security.Cryptography.X509Certificates;
 | 
					using System.Security.Cryptography.X509Certificates;
 | 
				
			||||||
using System.Security.Principal;
 | 
					using System.Security.Principal;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
using System.Threading;
 | 
					using System.Threading;
 | 
				
			||||||
using WebSocketSharp.Net;
 | 
					using WebSocketSharp.Net;
 | 
				
			||||||
using WebSocketSharp.Net.WebSockets;
 | 
					using WebSocketSharp.Net.WebSockets;
 | 
				
			||||||
@@ -821,6 +822,20 @@ namespace WebSocketSharp.Server
 | 
				
			|||||||
             : address.ToString ();
 | 
					             : address.ToString ();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private string createFilePath (string path)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      var parent = _rootPath;
 | 
				
			||||||
 | 
					      var child = path.TrimStart ('/', '\\');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      var buff = new StringBuilder (parent, 32);
 | 
				
			||||||
 | 
					      if (parent == "/" || parent == "\\")
 | 
				
			||||||
 | 
					        buff.Append (child);
 | 
				
			||||||
 | 
					      else
 | 
				
			||||||
 | 
					        buff.AppendFormat ("/{0}", child);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      return buff.ToString ().Replace ('\\', '/');
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private static string getHost (Uri uri)
 | 
					    private static string getHost (Uri uri)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      return uri.HostNameType == UriHostNameType.IPv6 ? uri.Host : uri.DnsSafeHost;
 | 
					      return uri.HostNameType == UriHostNameType.IPv6 ? uri.Host : uri.DnsSafeHost;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user