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[] { "/" }, 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) |