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 IsHeaderValueLegal(string headerValue) { return(!UnityWebRequest.ContainsForbiddenCharacters(headerValue, 32)); }