private static ContainsForbiddenCharacters ( string s, int firstAllowedCharCode ) : bool | ||
s | string | |
firstAllowedCharCode | int | |
Результат | bool |
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); }
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); }
private static bool IsHeaderValueLegal(string headerValue) { return(!string.IsNullOrEmpty(headerValue) && !UnityWebRequest.ContainsForbiddenCharacters(headerValue, 32)); }