50 lines
1.7 KiB
C#
50 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Net;
|
|
using System.Web;
|
|
using WebDAVSharp.Server.Adapters;
|
|
using WebDAVSharp.Server.Stores;
|
|
|
|
namespace WebDAVSharp.Server.MethodHandlers {
|
|
/// <summary>
|
|
/// This class implements the <c>PUT</c> HTTP method for WebDAV#.
|
|
/// </summary>
|
|
internal class WebDavUnlockMethodHandler : WebDavMethodHandlerBase, IWebDavMethodHandler {
|
|
/// <summary>
|
|
/// Gets the collection of the names of the HTTP methods handled by this instance.
|
|
/// </summary>
|
|
/// <value>
|
|
/// The names.
|
|
/// </value>
|
|
public IEnumerable<string> Names {
|
|
get {
|
|
return new[]
|
|
{
|
|
"UNLOCK"
|
|
};
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Processes the request.
|
|
/// </summary>
|
|
/// <param name="server">The <see cref="WebDavServer" /> through which the request came in from the client.</param>
|
|
/// <param name="context">The
|
|
/// <see cref="IHttpListenerContext" /> object containing both the request and response
|
|
/// objects to use.</param>
|
|
/// <param name="store">The <see cref="IWebDavStore" /> that the <see cref="WebDavServer" /> is hosting.</param>
|
|
public void ProcessRequest(WebDavServer server, HttpContext context, IWebDavStore store, String fileName) {
|
|
// Get the parent collection of the item
|
|
IWebDavStoreCollection collection = GetParentCollection(server, store, fileName);
|
|
|
|
// Get the item from the collection
|
|
IWebDavStoreItem item = GetItemFromCollection(collection, fileName);
|
|
|
|
/***************************************************************************************************
|
|
* Send the response
|
|
***************************************************************************************************/
|
|
|
|
context.SendSimpleResponse(HttpStatusCode.NoContent);
|
|
}
|
|
}
|
|
} |