Check to see if a resource is currently write locked. The method will look at the "If" header to make sure the client has demonstrated knowledge of the appropriate lock tokens. @param path The relative path @param req Servlet request @return true if the resource is locked (and no app
(String path, HttpServletRequest req)
| 2018 | * one of the non-shared locks which are present on the resource). |
| 2019 | */ |
| 2020 | private boolean isLocked(String path, HttpServletRequest req) { |
| 2021 | |
| 2022 | if (path == null) { |
| 2023 | path = getRelativePath(req); |
| 2024 | } |
| 2025 | |
| 2026 | String ifHeader = req.getHeader("If"); |
| 2027 | if (ifHeader == null) { |
| 2028 | ifHeader = ""; |
| 2029 | } |
| 2030 | |
| 2031 | return isLocked(path, req.getRemoteUser(), ifHeader); |
| 2032 | } |
| 2033 | |
| 2034 | |
| 2035 | /** |
no test coverage detected