DAV-Ext#
Este módulo estende o suporte ao WebDAV com os métodos PROPFIND, OPTIONS, LOCK e UNLOCK.
O módulo padrão DAV fornece uma implementação parcial do
WebDAV e suporta apenas os métodos GET, HEAD, PUT, DELETE, MKCOL, COPY e MOVE.
Para obter suporte completo ao WebDAV, você precisa habilitar o módulo padrão
Para instalar o módulo, use um dos
seguintes pacotes: Angie: Angie PRO: Para carregar o módulo no contexto de Enviando um arquivo para o servidor: Sobrescrevendo o mesmo arquivo: Bloqueando o arquivo contra sobrescrita: Tentando sobrescrever o arquivo: O arquivo está bloqueado. Desbloqueando o arquivo: Sobrescrevendo o arquivo: O arquivo foi desbloqueado e sobrescrito com sucesso. Documentação detalhada e código-fonte estão disponíveis em:
arut/nginx-dav-ext-modulehttp_dav_module
, bem como este módulo para os métodos ausentes.Instalação#
angie-module-dav-ext
angie-pro-module-dav-ext
Carregando o Módulo#
main{}
:load_module modules/ngx_http_dav_ext_module.so;
Exemplo de Configuração#
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;
}
}
Exemplos de Execução de Requisições#
$ 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
Informações Adicionais#