как работает DAV (или почему он не работает) ?

xinu xinu на list.ru
Чт Мар 18 13:32:20 MSK 2010


день добрый,

не могу разобраться с DAV:


$ svn co   http://localhost:8083/donna
svn: Server sent unexpected return value (405 Not Allowed) in response to OPTIONS request for 'http://localhost:8083/donna'

$ l /data/dev/repos/svn/repos/
total 0
drwxr-xr-x 6 svn svn 200 2010-03-17 18:38 donna



конфиг (на порту 8083 - только один server) :

 server {
   listen       8083;
   server_name  default localhost;
   error_log   logs/8083.error.log   debug;
   access_log  logs/hms_dev03_8083.access.log  main  buffer=32k;
     root    /data/dev/repos/svn/repos/  ;
   location / {
     # root  /data/dev/repos/svn/repos/;
     # client_body_temp_path  /tmp/client_temp;
     dav_methods  PUT DELETE MKCOL COPY MOVE; 
     dav_access user:rw group:rw all:r;
     create_full_put_path on;
     autoindex              on;
    }
}


/opt/nginx/sbin/nginx -V
nginx version: nginx/0.8.34
built by gcc 4.4.1 (Ubuntu 4.4.1-4ubuntu9) 
TLS SNI support enabled
configure arguments: --prefix=/opt/nginx --user=nginx --group=nginx --with-poll_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-debug



svn co    svn://localhost/donna   - работает


в error логе:
2010/03/18 10:56:39 [debug] 22508#0: accept on 0.0.0.0:8083, ready: 0
2010/03/18 10:56:39 [debug] 22508#0: posix_memalign: 0000000000B3E4A0:256 @16 
2010/03/18 10:56:39 [debug] 22508#0: *2648 accept: 127.0.0.1 fd:15
2010/03/18 10:56:39 [debug] 22508#0: *2648 event timer add: 15: 60000:1268906259012
2010/03/18 10:56:39 [debug] 22508#0: *2648 epoll add event: fd:15 op:1 ev:80000001
2010/03/18 10:56:39 [debug] 22508#0: *2648 malloc: 0000000000B3AE10:1288
2010/03/18 10:56:39 [debug] 22508#0: *2648 posix_memalign: 0000000000B3B320:256 @16 
2010/03/18 10:56:39 [debug] 22508#0: *2648 malloc: 0000000000B3B430:1024
2010/03/18 10:56:39 [debug] 22508#0: *2648 posix_memalign: 0000000000B3B840:4096 @16 
2010/03/18 10:56:39 [debug] 22508#0: *2648 http process request line
2010/03/18 10:56:39 [debug] 22508#0: *2648 recv: fd:15 520 of 1024
2010/03/18 10:56:39 [debug] 22508#0: *2648 http request line: "OPTIONS /donna HTTP/1.1"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http uri: "/donna"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http args: ""
2010/03/18 10:56:39 [debug] 22508#0: *2648 http exten: ""
2010/03/18 10:56:39 [debug] 22508#0: *2648 http process request header line
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header: "Host: localhost:8083"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header: "User-Agent: SVN/1.6.5 (r38866) neon/0.28.6"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header: "Keep-Alive: "
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header: "Connection: TE, Keep-Alive"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header: "TE: trailers"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header: "Content-Type: text/xml"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header: "Accept-Encoding: gzip"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header: "DAV: http://subversion.tigris.org/xmlns/dav/svn/depth"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header: "DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header: "DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header: "Content-Length: 104"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header: "Accept-Encoding: gzip"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http header done
2010/03/18 10:56:39 [debug] 22508#0: *2648 event timer del: 15: 1268906259012
2010/03/18 10:56:39 [debug] 22508#0: *2648 generic phase: 0
2010/03/18 10:56:39 [debug] 22508#0: *2648 generic phase: 1
2010/03/18 10:56:39 [debug] 22508#0: *2648 test location: "/" 
2010/03/18 10:56:39 [debug] 22508#0: *2648 using configuration "/" 
2010/03/18 10:56:39 [debug] 22508#0: *2648 http cl:104 max:1048576
2010/03/18 10:56:39 [debug] 22508#0: *2648 generic phase: 3
2010/03/18 10:56:39 [debug] 22508#0: *2648 post rewrite phase: 4
2010/03/18 10:56:39 [debug] 22508#0: *2648 generic phase: 5
2010/03/18 10:56:39 [debug] 22508#0: *2648 generic phase: 6
2010/03/18 10:56:39 [debug] 22508#0: *2648 generic phase: 7
2010/03/18 10:56:39 [debug] 22508#0: *2648 access phase: 8
2010/03/18 10:56:39 [debug] 22508#0: *2648 access phase: 9
2010/03/18 10:56:39 [debug] 22508#0: *2648 post access phase: 10
2010/03/18 10:56:39 [debug] 22508#0: *2648 try files phase: 11
2010/03/18 10:56:39 [debug] 22508#0: *2648 content phase: 12
2010/03/18 10:56:39 [debug] 22508#0: *2648 content phase: 13
2010/03/18 10:56:39 [debug] 22508#0: *2648 content phase: 14
2010/03/18 10:56:39 [debug] 22508#0: *2648 content phase: 15
2010/03/18 10:56:39 [debug] 22508#0: *2648 content phase: 16
2010/03/18 10:56:39 [debug] 22508#0: *2648 content phase: 17
2010/03/18 10:56:39 [debug] 22508#0: *2648 http finalize request: 405, "/donna?" a:1, c:1 
2010/03/18 10:56:39 [debug] 22508#0: *2648 http special response: 405, "/donna?"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http set discard body
2010/03/18 10:56:39 [debug] 22508#0: *2648 xslt filter header
2010/03/18 10:56:39 [debug] 22508#0: *2648 HTTP/1.1 405 Not Allowed^M
Server: nginx/0.8.34^M
Date: Thu, 18 Mar 2010 09:56:39 GMT^M
Content-Type: text/html^M
Content-Length: 173^M
Connection: keep-alive^M

2010/03/18 10:56:39 [debug] 22508#0: *2648 write new buf t:1 f:0 0000000000B3C2E0, pos 0000000000B3C2E0, size: 157 file: 0, size: 0
2010/03/18 10:56:39 [debug] 22508#0: *2648 http write filter: l:0 f:0 s:157
2010/03/18 10:56:39 [debug] 22508#0: *2648 http output filter "/donna?"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http copy filter: "/donna?"
2010/03/18 10:56:39 [debug] 22508#0: *2648 image filter
2010/03/18 10:56:39 [debug] 22508#0: *2648 xslt filter body
2010/03/18 10:56:39 [debug] 22508#0: *2648 http postpone filter "/donna?" 0000000000B3C4A8
2010/03/18 10:56:39 [debug] 22508#0: *2648 write old buf t:1 f:0 0000000000B3C2E0, pos 0000000000B3C2E0, size: 157 file: 0, size: 0
2010/03/18 10:56:39 [debug] 22508#0: *2648 write new buf t:0 f:0 0000000000000000, pos 00000000006890A0, size: 120 file: 0, size: 0
2010/03/18 10:56:39 [debug] 22508#0: *2648 write new buf t:0 f:0 0000000000000000, pos 0000000000688AA0, size: 53 file: 0, size: 0
2010/03/18 10:56:39 [debug] 22508#0: *2648 http write filter: l:1 f:0 s:330
2010/03/18 10:56:39 [debug] 22508#0: *2648 http write filter limit 0
2010/03/18 10:56:39 [debug] 22508#0: *2648 writev: 330
2010/03/18 10:56:39 [debug] 22508#0: *2648 http write filter 0000000000000000
2010/03/18 10:56:39 [debug] 22508#0: *2648 http copy filter: 0 "/donna?"
2010/03/18 10:56:39 [debug] 22508#0: *2648 http finalize request: 0, "/donna?" a:1, c:1
2010/03/18 10:56:39 [debug] 22508#0: *2648 set http keepalive handler
2010/03/18 10:56:39 [debug] 22508#0: *2648 http close request
2010/03/18 10:56:39 [debug] 22508#0: *2648 http log handler
2010/03/18 10:56:39 [debug] 22508#0: *2648 free: 0000000000B3B840, unused: 856
2010/03/18 10:56:39 [debug] 22508#0: *2648 event timer add: 15: 65000:1268906264012
2010/03/18 10:56:39 [debug] 22508#0: *2648 free: 0000000000B3AE10
2010/03/18 10:56:39 [debug] 22508#0: *2648 free: 0000000000B3B430
2010/03/18 10:56:39 [debug] 22508#0: *2648 hc free: 0000000000000000 0
2010/03/18 10:56:39 [debug] 22508#0: *2648 hc busy: 0000000000000000 0
2010/03/18 10:56:39 [debug] 22508#0: *2648 tcp_nodelay
2010/03/18 10:56:39 [debug] 22508#0: *2648 post event 0000000000B64D48
2010/03/18 10:56:39 [debug] 22508#0: *2648 delete posted event 0000000000B64D48
2010/03/18 10:56:39 [debug] 22508#0: *2648 http keepalive handler
2010/03/18 10:56:39 [debug] 22508#0: *2648 malloc: 0000000000B3AE10:1024
2010/03/18 10:56:39 [debug] 22508#0: *2648 recv: fd:15 -1 of 1024
2010/03/18 10:56:39 [debug] 22508#0: *2648 recv() not ready (11: Resource temporarily unavailable)
2010/03/18 10:56:39 [debug] 22508#0: *2648 http keepalive handler
2010/03/18 10:56:39 [debug] 22508#0: *2648 recv: fd:15 0 of 1024
2010/03/18 10:56:39 [info] 22508#0: *2648 client 127.0.0.1 closed keepalive connection
2010/03/18 10:56:39 [debug] 22508#0: *2648 close http connection: 15
2010/03/18 10:56:39 [debug] 22508#0: *2648 event timer del: 15: 1268906264012
2010/03/18 10:56:39 [debug] 22508#0: *2648 free: 0000000000B3AE10
2010/03/18 10:56:39 [debug] 22508#0: *2648 free: 0000000000000000
2010/03/18 10:56:39 [debug] 22508#0: *2648 free: 0000000000B3E4A0, unused: 8
2010/03/18 10:56:39 [debug] 22508#0: *2648 free: 0000000000B3B320, unused: 128








честно говоря много непоняток:
 1.   как связан   root  с  svnroot ? они должны совпадать? (в доке вроде не нашел)
 2.   делает ли (должен делать) DAV_mod  file:///.../   и может ли он проксиревать  на svn://<destination>/$uri   -    хотя ето отдельный вопрос вне рамках данного, просто для понимания
 3.   google :  nginx + OPTIONS дал пару бложных статей где люди утверждают, что nginx  не умеет OPTIONS
       но как отучить  svn  от етого?

# tcpdump -vvvv -s0   -i lo -w /tmp/dump1
tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
^C12 packets captured
24 packets received by filter
0 packets dropped by kernel

# strings /tmp/dump1  | less
OPTIONS /donna HTTP/1.1
Host: localhost:8083
User-Agent: SVN/1.6.5 (r38866) neon/0.28.6
Keep-Alive: 
Connection: TE, Keep-Alive
TE: trailers
Content-Type: text/xml
Accept-Encoding: gzip
DAV: http://subversion.tigris.org/xmlns/dav/svn/depth
DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops
Content-Length: 104
Accept-Encoding: gzip
<?xml version="1.0" encoding="utf-8"?><D:options xmlns:D="DAV:"><D:activity-collection-set/></D:options>
HTTP/1.1 405 Not Allowed
Server: nginx/0.8.34
Date: Thu, 18 Mar 2010 10:22:12 GMT
Content-Type: text/html
Content-Length: 173
Connection: keep-alive
<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx/0.8.34</center>
</body>
</html>
  

  4. ну конечно ламерский вопрос "почему не работает"


буду признателен за любую помощь :-)  

спасибо

сергей







Подробная информация о списке рассылки nginx-ru