Support for HTTP OPTIONS method

Boris Karnaukh bk532 at 012.net.il
Sat Feb 17 17:35:29 MSK 2007


Добрый день!

Я попробовал построить standalone DAV  
сервер на nginx и столкнулся с тем, что  
по умолчанию nginx не поддерживает HTTP  
метод OPTIONS, без которого многие DAV  
клиенты отказываются работать.

Цитата из nginx.conf:

         server {
                 server_name     idisk;

                 root            /opt/iDisk/html;

                 location /favicon.ico {
                         empty_gif;
                         access_log off;
                 }

                 location / {
                         autoindex       on;
                         dav_methods  PUT DELETE MKCOL;
                         limit_except OPTIONS {
                         auth_basic      "iDisk";
                         auth_basic_user_file    /opt/iDisk/user.passwd;
                         }
                 }
         }

Цитата из error.log:

2007/02/17 16:06:49 [debug] 19661#0: *1 http request line: "OPTIONS /  
HTTP/1.1"
2007/02/17 16:06:49 [debug] 19661#0: *1 http uri: "/"
2007/02/17 16:06:49 [debug] 19661#0: *1 http args: ""
2007/02/17 16:06:49 [debug] 19661#0: *1 http exten: ""
2007/02/17 16:06:49 [debug] 19661#0: *1 http process request header line
2007/02/17 16:06:49 [debug] 19661#0: *1 http header: "User-Agent:  
WebDAVFS/1.4.1 (01418000) Darwin/8.8.0 (Power Macintosh)"
2007/02/17 16:06:49 [debug] 19661#0: *1 http header: "Accept: */*"
2007/02/17 16:06:49 [debug] 19661#0: *1 http header: "Content-Length: 0"
2007/02/17 16:06:49 [debug] 19661#0: *1 http header: "Connection:  
keep-alive"
2007/02/17 16:06:49 [debug] 19661#0: *1 http header: "Host: idisk"
2007/02/17 16:06:49 [debug] 19661#0: *1 http header done
2007/02/17 16:06:49 [debug] 19661#0: *1 event timer del: 7: 3490165249
2007/02/17 16:06:49 [debug] 19661#0: *1 generic phase: 0
2007/02/17 16:06:49 [debug] 19661#0: *1 find location for "/"
2007/02/17 16:06:49 [debug] 19661#0: *1 find location: "/"
2007/02/17 16:06:49 [debug] 19661#0: *1 find location: "/favicon.ico"
2007/02/17 16:06:49 [debug] 19661#0: *1 find location for "/"
2007/02/17 16:06:49 [debug] 19661#0: *1 using configuration "/"
2007/02/17 16:06:49 [debug] 19661#0: *1 http cl:0 max:1048576
2007/02/17 16:06:49 [debug] 19661#0: *1 generic phase: 2
2007/02/17 16:06:49 [debug] 19661#0: *1 post rewrite phase: 3
2007/02/17 16:06:49 [debug] 19661#0: *1 generic phase: 4
2007/02/17 16:06:49 [debug] 19661#0: *1 access phase: 5
2007/02/17 16:06:49 [debug] 19661#0: *1 access phase: 6
2007/02/17 16:06:49 [debug] 19661#0: *1 post access phase: 7
2007/02/17 16:06:49 [debug] 19661#0: *1 content phase: 8
2007/02/17 16:06:49 [debug] 19661#0: *1 content phase: 9
2007/02/17 16:06:49 [debug] 19661#0: *1 content phase: 10
2007/02/17 16:06:49 [debug] 19661#0: *1 content phase: 11
2007/02/17 16:06:49 [debug] 19661#0: *1 http finalize request: 405, "/?"
2007/02/17 16:06:49 [debug] 19661#0: *1 http special response: 405, "/"

Как разрешить эту проблему?

P.S. Как можно догадаться, я пробую  
симитировать iDisk/.Mac на чистом nginx. Как  
только будет осмысленный результат,  
тут же опубликую.

borisk




More information about the nginx-ru mailing list