Browse Source

[Modify] Polish it

pull/393/head
sta 8 years ago
parent
commit
8095728c06
  1. 9
      websocket-sharp/Server/HttpRequestEventArgs.cs

9
websocket-sharp/Server/HttpRequestEventArgs.cs

@ -245,18 +245,9 @@ namespace WebSocketSharp.Server
if (path.Length == 0)
throw new ArgumentException ("An empty string.", "path");
if (path.IndexOf (':') > -1)
throw new ArgumentException ("It contains ':'.", "path");
if (path.IndexOf ("..") > -1)
throw new ArgumentException ("It contains '..'.", "path");
if (path.IndexOf ("//") > -1)
throw new ArgumentException ("It contains '//'.", "path");
if (path.IndexOf ("\\\\") > -1)
throw new ArgumentException ("It contains '\\\\'.", "path");
return tryReadFile (createFilePath (path), out contents);
}

Loading…
Cancel
Save