System.Net.HttpListenerRequestUriBuilder.AddSlashToAsteriskOnlyPath C# (CSharp) Метод

AddSlashToAsteriskOnlyPath() приватный статический Метод

private static AddSlashToAsteriskOnlyPath ( string path ) : string
path string
Результат string
        private static string AddSlashToAsteriskOnlyPath(string path)
        {
            Debug.Assert(path != null, "'path' must not be null");

            // If a request like "OPTIONS * HTTP/1.1" is sent to the listener, then the request Uri
            // should be "http[s]://server[:port]/*" to be compatible with pre-4.0 behavior.
            if ((path.Length == 1) && (path[0] == '*'))
            {
                return "/*";
            }

            return path;
        }