[Modify] Polish it

This commit is contained in:
sta 2020-10-01 19:36:19 +09:00
parent e268168e6a
commit 2974c5fa22

View File

@ -112,8 +112,11 @@ namespace WebSocketSharp.Net
var path = pref.Path; var path = pref.Path;
if (path.IndexOf ('%') != -1) if (path.IndexOf ('%') != -1) {
throw new HttpListenerException (87, "Includes an invalid path."); var msg = "The URI prefix includes an invalid path.";
throw new HttpListenerException (87, msg);
}
if (path.IndexOf ("//", StringComparison.Ordinal) != -1) if (path.IndexOf ("//", StringComparison.Ordinal) != -1)
throw new HttpListenerException (87, "Includes an invalid path."); throw new HttpListenerException (87, "Includes an invalid path.");