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

private static ContainsForbiddenCharacters ( string s, int firstAllowedCharCode ) : bool
s string
firstAllowedCharCode int
Результат bool
Пример #1
0
 private static bool IsHeaderNameLegal(string headerName)
 {
     if (string.IsNullOrEmpty(headerName))
     {
         return(false);
     }
     headerName = headerName.ToLower();
     if (UnityWebRequest.ContainsForbiddenCharacters(headerName, 33))
     {
         return(false);
     }
     if (headerName.StartsWith("sec-") || headerName.StartsWith("proxy-"))
     {
         return(false);
     }
     string[] array = UnityWebRequest.forbiddenHeaderKeys;
     for (int i = 0; i < array.Length; i++)
     {
         string b = array[i];
         if (string.Equals(headerName, b))
         {
             return(false);
         }
     }
     return(true);
 }
Пример #2
0
 private static bool IsHeaderNameLegal(string headerName)
 {
     if (string.IsNullOrEmpty(headerName))
     {
         return(false);
     }
     headerName = headerName.ToLower();
     if (UnityWebRequest.ContainsForbiddenCharacters(headerName, 33) || headerName.StartsWith("sec-") || headerName.StartsWith("proxy-"))
     {
         return(false);
     }
     foreach (string forbiddenHeaderKey in UnityWebRequest.forbiddenHeaderKeys)
     {
         if (string.Equals(headerName, forbiddenHeaderKey))
         {
             return(false);
         }
     }
     return(true);
 }
Пример #3
0
 private static bool IsHeaderValueLegal(string headerValue)
 {
     return(!string.IsNullOrEmpty(headerValue) && !UnityWebRequest.ContainsForbiddenCharacters(headerValue, 32));
 }