nginx-0.3.40-RELEASE import

    *) Feature: the ngx_http_dav_module supports the MKCOL method.

    *) Feature: the "create_full_put_path" directive.

    *) Feature: the "$limit_rate" variable.
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 1da91b7..2e13e6b 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,7 +8,7 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define NGINX_VER          "nginx/0.3.39"
+#define NGINX_VER          "nginx/0.3.40"
 
 #define NGINX_VAR          "NGINX"
 #define NGX_OLDPID_EXT     ".oldbin"
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c
index 0a2c371..c3c4592 100644
--- a/src/core/ngx_file.c
+++ b/src/core/ngx_file.c
@@ -25,8 +25,12 @@
             return rc;
         }
 
-        if (!tf->persistent && tf->warn) {
-            ngx_log_error(NGX_LOG_WARN, tf->file.log, 0, tf->warn);
+        if (tf->log_level == NGX_LOG_NOTICE) {
+            ngx_log_error(NGX_LOG_NOTICE, tf->file.log, 0, tf->warn);
+
+        } else if (tf->log_level == NGX_LOG_WARN) {
+            ngx_log_error(NGX_LOG_WARN, tf->file.log, 0, "%s %V",
+                          tf->warn, &tf->file.name);
         }
     }
 
@@ -182,6 +186,35 @@
 }
 
 
+ngx_err_t
+ngx_create_full_path(u_char *dir)
+{
+    u_char     *p, ch;
+    ngx_err_t   err;
+
+    for (p = dir + 1; *p; p++) {
+        ch = *p;
+
+        if (ch != '/') {
+            continue;
+        }
+
+        *p = '\0';
+
+        if (ngx_create_dir(dir) == NGX_FILE_ERROR) {
+            err = ngx_errno;
+            if (err != NGX_EEXIST) {
+                return err;
+            }
+        }
+
+        *p = '/';
+    }
+
+    return 0;
+}
+
+
 void
 ngx_init_temp_number(void)
 {
diff --git a/src/core/ngx_file.h b/src/core/ngx_file.h
index 488c10a..3ec3056 100644
--- a/src/core/ngx_file.h
+++ b/src/core/ngx_file.h
@@ -51,6 +51,7 @@
 
     ngx_uint_t          mode;
 
+    unsigned            log_level:8;
     unsigned            persistent:1;
 } ngx_temp_file_t;
 
@@ -60,6 +61,7 @@
     ngx_pool_t *pool, ngx_uint_t persistent,ngx_uint_t mode);
 void ngx_create_hashed_filename(ngx_file_t *file, ngx_path_t *path);
 ngx_int_t ngx_create_path(ngx_file_t *file, ngx_path_t *path);
+ngx_err_t ngx_create_full_path(u_char *dir);
 ngx_int_t ngx_add_path(ngx_conf_t *cf, ngx_path_t **slot);
 ngx_int_t ngx_create_pathes(ngx_cycle_t *cycle, ngx_uid_t user);