case "ico":
case "png":
return MimeType.image_png;
case "htm":
case "html":
case "xhtml":
case "dhtml":
return MimeType.text_html;
case "js":
return MimeType.text_javascript;
case "xml":
return MimeType.multipart_xmixedreplace;
default:
return MimeType.none;
}
}
public static string CleanJsonString(string url)
{
if (url == null) return null;
return url.Replace("%27", "\"").Replace("%35", "#").Replace("%20", " ").Replace("%61", "=").Replace("%63", "?");
}
public static string[] GetUrlQueries(string queryUrlString)
{
return queryUrlString.Split(new string[] { "&" }, StringSplitOptions.RemoveEmptyEntries);
}
#region Custom
public static string RemoveToken(string completeReq)
{
if (completeReq.Contains("__"))
{
completeReq = completeReq.Split(new string[] { "__" }, StringSplitOptions.RemoveEmptyEntries)[0];
}
string[] _pReq = completeReq.Split(new string[] { "?" }, StringSplitOptions.RemoveEmptyEntries);
if (_pReq.Length < 2) return string.Empty;
else return _pReq[1]; HTTP服务器软件系统的设计与实现(22):http://www.751com.cn/jisuanji/lunwen_3170.html