毕业论文

打赏
当前位置: 毕业论文 > 计算机论文 >

HTTP服务器软件系统的设计与实现(22)

时间:2017-02-21 13:09来源:毕业论文
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_xmi


                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.youerw.com/jisuanji/lunwen_3170.html
------分隔线----------------------------
推荐内容