This servlet adds support for WebDAV level 3 . All the basic HTTP requests are handled by the DefaultServlet. The WebDAV servlet is only designed for use with path mapping. The WebdavSer
| 181 | * @see <a href="https://tools.ietf.org/html/rfc4918">RFC 4918</a> |
| 182 | */ |
| 183 | public class WebdavServlet extends DefaultServlet implements PeriodicEventListener { |
| 184 | |
| 185 | /** |
| 186 | * Constructs a new WebdavServlet. |
| 187 | */ |
| 188 | public WebdavServlet() { |
| 189 | } |
| 190 | |
| 191 | @Serial |
| 192 | private static final long serialVersionUID = 1L; |
| 193 | |
| 194 | |
| 195 | /** |
| 196 | * Default lock timeout value. |
| 197 | */ |
| 198 | private static final int DEFAULT_TIMEOUT = 3600; |
| 199 | |
| 200 | |
| 201 | /** |
| 202 | * Maximum lock timeout. |
| 203 | */ |
| 204 | private static final int MAX_TIMEOUT = 604800; |
| 205 | |
| 206 | |
| 207 | /** |
| 208 | * Default maximum depth. |
| 209 | */ |
| 210 | private static final int MAX_DEPTH = 3; |
| 211 | |
| 212 | |
| 213 | /* |
| 214 | * Default max request body size. |
| 215 | */ |
| 216 | private static final int DEFAULT_MAX_REQUEST_BODY_SIZE = 4096; |
| 217 | |
| 218 | |
| 219 | /** |
| 220 | * Default namespace. |
| 221 | */ |
| 222 | protected static final String DEFAULT_NAMESPACE = "DAV:"; |
| 223 | |
| 224 | |
| 225 | /** |
| 226 | * Pre generated raw XML for supported locks. |
| 227 | */ |
| 228 | protected static final String SUPPORTED_LOCKS = |
| 229 | "\n <D:lockentry><D:lockscope><D:exclusive/></D:lockscope><D:locktype><D:write/></D:locktype></D:lockentry>\n" + |
| 230 | " <D:lockentry><D:lockscope><D:shared/></D:lockscope><D:locktype><D:write/></D:locktype></D:lockentry>\n"; |
| 231 | |
| 232 | |
| 233 | /** |
| 234 | * Simple date format for the creation date ISO representation (partial). |
| 235 | */ |
| 236 | protected static final ConcurrentDateFormat creationDateFormat = |
| 237 | new ConcurrentDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US, TimeZone.getTimeZone("GMT")); |
| 238 | |
| 239 | |
| 240 | /** |
nothing calls this directly
no test coverage detected