diff --git a/WebDavSharp_MVC/WebDAVSharp.WebServer/Controllers/WebDAVController.cs b/WebDavSharp_MVC/WebDAVSharp.WebServer/Controllers/WebDAVController.cs index a3cc009..5535b15 100644 --- a/WebDavSharp_MVC/WebDAVSharp.WebServer/Controllers/WebDAVController.cs +++ b/WebDavSharp_MVC/WebDAVSharp.WebServer/Controllers/WebDAVController.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Net; using System.Net.Http; @@ -11,18 +12,14 @@ using WebDAVSharp.Server.Stores.DiskStore; namespace WebDAVSharp.WebServer.Controllers { public class WebDAVController : ApiController { - [Route("test"), HttpGet] - public dynamic Test() { - return new { bla = "blupp", kinz = "kunz" }; - } - [Route("webDav/{*FileName}"), AcceptVerbs("OPTIONS", "GET", "HEAD", "PROPFIND", "PROPPATCH", "MKCOL", "PUT", "DELETE", "COPY", "MOVE", "LOCK", "UNLOCK", - "TRACE", "POST")] + [Route("webDav/{*FileName}"), + AcceptVerbs("OPTIONS", "GET", "HEAD", "PROPFIND", "PROPPATCH", "MKCOL", "PUT", "DELETE", "COPY", "MOVE", "LOCK", "UNLOCK", "TRACE", "POST")] public void WebDav(String FileName) { var rootPath = @"t:\"; var store = new WebDavDiskStore(rootPath); var webDavServer = new WebDavServer(store); - webDavServer.ServiceUrl = "http://" + Request.RequestUri.Authority + "/webDAV/"; // trailing slash is important + webDavServer.ServiceUrl = "http://" + Request.RequestUri.Authority + "/webDAV/"; // trailing slash is important //TODO: check protocol HTTP vs. HTTPS webDavServer.ProcessRequest(HttpContext.Current, FileName); //HttpContext.Current.Response.Flush();