DavResource resource) throws IOException, DavException {
if (!resource.exists()) {
response.sendError(DavServletResponse.SC_NOT_FOUND);
}
BindInfo bindInfo = request.getBindInfo();
DavResource oldBinding = getResourceFactory().createResource(request.getHrefLocator(bindInfo.getHref()), request, response);
if (!(oldBinding instanceof BindableResource)) {
response.sendError(DavServletResponse.SC_METHOD_NOT_ALLOWED);
return;
}
DavResource newBinding = getResourceFactory().createResource(request.getMemberLocator(bindInfo.getSegment()), request, response);
int status = validateDestination(newBinding, request, false);
if (status > DavServletResponse.SC_NO_CONTENT) {
response.sendError(status);
return;
}