HTTP服务器软件系统的设计与实现(14)_毕业论文

毕业论文移动版

毕业论文 > 计算机论文 >

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


                        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); (责任编辑:qin)