毕业论文

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

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

时间:2017-02-21 13:09来源:毕业论文
if (subparts[0] == POST) req.Method = HttpMethodType.Post; if (!String.IsNullOrEmpty(subparts[1])) { //在目录拆分路径 string[] resourcePaths = subparts[1].Split(new string[] { / }, StringSpli


                        if (subparts[0] == "POST") req.Method = HttpMethodType.Post;                        
                        if (!String.IsNullOrEmpty(subparts[1]))
                        {
                            //在“目录”拆分路径
                            string[] resourcePaths = subparts[1].Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
                            if (resourcePaths.Length > 0)
                            {
                                ///
                                /// 我们作出区分之间HttpStaticRequest HttpPage的
                                ///
                                
                                string resourceFullName = resourcePaths[resourcePaths.Length - 1];
                                
                                if (HttpHelper.IsStaticResource(resourceFullName))
                                {
                                    request = HttpRequestType.HttpStaticRequest;
                                }
                            }
                        }
                        else throw new InvalidOperationException("Invalid Request : " + req.CompleteRequest); HTTP服务器软件系统的设计与实现(14):http://www.youerw.com/jisuanji/lunwen_3170.html
------分隔线----------------------------
推荐内容