DAV-Ext#
Este módulo extiende el soporte WebDAV con los métodos PROPFIND, OPTIONS, LOCK y UNLOCK.
El módulo estándar DAV proporciona una implementación parcial de
WebDAV y solo soporta los métodos GET, HEAD, PUT, DELETE, MKCOL, COPY y MOVE.
Para lograr un soporte WebDAV completo, necesitas habilitar el módulo estándar
Para instalar el módulo, usa uno de los
siguientes paquetes: Angie: Angie PRO: Para cargar el módulo en el contexto de Subiendo un archivo al servidor: Sobrescribiendo el mismo archivo: Bloqueando el archivo para evitar sobrescritura: Intentando sobrescribir el archivo: El archivo está bloqueado. Desbloqueando el archivo: Sobrescribiendo el archivo: El archivo ha sido desbloqueado y sobrescrito exitosamente. La documentación detallada y el código fuente están disponibles en:
arut/nginx-dav-ext-modulehttp_dav_module
, así como este módulo para los métodos faltantes.Instalación#
angie-module-dav-ext
angie-pro-module-dav-ext
Carga del módulo#
main{}
:load_module modules/ngx_http_dav_ext_module.so;
Ejemplo de configuración#
dav_ext_lock_zone zone=lock_zone:10m;
server {
listen 80 default_server;
location / {
root /usr/share/angie/html;
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK;
dav_ext_lock zone=lock_zone;
}
}
Ejemplos de ejecución de solicitudes#
$ curl -i -X PUT -d @testf1.txt http://127.0.0.1/testf1.txt
HTTP/1.1 201 Created
Server: Angie/1.10.2
Date: Thu, 21 Aug 2025 19:15:35 GMT
Content-Length: 0
Location: http://127.0.0.1/testf1.txt
Connection: keep-alive
$ curl -i -X PUT -d @testf1.txt http://127.0.0.1/testf1.txt
HTTP/1.1 204 No Content
Server: Angie/1.10.2
Date: Thu, 21 Aug 2025 19:15:35 GMT
Connection: keep-alive
$ curl -i -X LOCK http://127.0.0.1/testf1.txt
HTTP/1.1 200 OK
Server: Angie/1.10.2
Date: Thu, 21 Aug 2025 19:15:35 GMT
Content-Type: text/xml; charset=utf-8
Content-Length: 392
Connection: keep-alive
Lock-Token: <urn:7502d56f>
$ curl -i -X PUT -d @testf1.txt http://127.0.0.1/testf1.txt
HTTP/1.1 423
Server: Angie/1.10.2
Date: Thu, 21 Aug 2025 19:15:35 GMT
Content-Length: 0
Connection: keep-alive
$ curl -i -X UNLOCK -H 'Lock-Token: <urn:7502d56f>' http://127.0.0.1/testf1.txt
HTTP/1.1 204 No Content
Server: Angie/1.10.2
Date: Thu, 21 Aug 2025 19:15:35 GMT
Connection: keep-alive
$ curl -i -X PUT -d @testf1.txt http://127.0.0.1/testf1.txt
HTTP/1.1 204 No Content
Server: Angie/1.10.2
Date: Thu, 21 Aug 2025 19:15:35 GMT
Connection: keep-alive
Información adicional#