提交 ed55775b 编写于 作者: Jason_WangG's avatar Jason_WangG

修订部分功能

上级 ca7e2959
......@@ -185,11 +185,19 @@ namespace Mozi.HttpEmbedded
//WEBDAV部分
else
{
return HandleRequestWebDAV(ref context);
}
return StatusCode.Success;
}
/// <summary>
/// 处理WebDAV请求
/// </summary>
private StatusCode HandleRequestWebDAV(ref HttpContext context)
{
//RequestMethod.PROPFIND,RequestMethod.PROPPATCH RequestMethod.MKCOL RequestMethod.COPY RequestMethod.MOVE RequestMethod.LOCK RequestMethod.UNLOCK
return StatusCode.MultiStatus;
}
/// <summary>
/// 取URL资源扩展名
/// </summary>
/// <param name="path"></param>
......@@ -215,12 +223,13 @@ namespace Mozi.HttpEmbedded
if (router.Match(context.Request.Path) != null)
{
router.Invoke(context);
context.Response.Write("<html>"
+ "<head></head>"
+ "<body>"
+ " <strong>Welcome to a Web Server Developed base on c#!</strong>"
+ "</body>"
+ "</html>");
//context.Response.Write("<html>"
// + "<head></head>"
// + "<body>"
// + " <strong>Welcome to a Web Server Developed base on c#!</strong>"
// + "</body>"
// + "</html>");
context.Response.Write(router.Invoke(context).ToString());
return StatusCode.Success;
}
return StatusCode.NotFound;
......
......@@ -115,6 +115,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="JSON\" />
<Folder Include="WebDav\" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册