/// <summary> /// Decode an URL /// </summary> /// <param name="text">Encoded URL</param> /// <param name="encoding">Encoding type</param> /// <returns>URL decoded</returns> public string UrlDecode(string text, Encoding encoding) { if (encoding == null) { throw new ArgumentNullException("encoding"); } return(HttpUtil.UriDecode(text, encoding)); }
private string ParseContentDispositionItem(string value) { if (value.Length == 0) { return(value); } if (value.Length >= 2 && value[0] == '"' && value[value.Length - 1] == '"') { value = value.Substring(1, value.Length - 2); } return(HttpUtil.UriDecode(value)); }