MCPcopy Create free account
hub / github.com/apache/tomcat / doPut

Method doPut

java/org/apache/catalina/servlets/WebdavServlet.java:1324–1347  ·  view source on GitHub ↗
(HttpServletRequest req, HttpServletResponse resp)

Source from the content-addressed store, hash-verified

1322
1323
1324 @Override
1325 protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
1326
1327 String path = getRelativePath(req);
1328
1329 WebResource resource = resources.getResource(path);
1330 if (!checkIfHeaders(req, resp, resource)) {
1331 resp.setStatus(HttpServletResponse.SC_PRECONDITION_FAILED);
1332 return;
1333 }
1334
1335 if (isLocked(path, req)) {
1336 resp.sendError(WebdavStatus.SC_LOCKED);
1337 return;
1338 }
1339
1340 if (resource.isDirectory()) {
1341 sendNotAllowed(req, resp);
1342 return;
1343 }
1344
1345 super.doPut(req, resp);
1346
1347 }
1348
1349
1350 /**

Callers

nothing calls this directly

Calls 8

getRelativePathMethod · 0.95
checkIfHeadersMethod · 0.95
isLockedMethod · 0.95
isDirectoryMethod · 0.95
sendNotAllowedMethod · 0.80
getResourceMethod · 0.65
setStatusMethod · 0.65
sendErrorMethod · 0.65

Tested by

no test coverage detected