about summary refs log tree commit homepage
path: root/http_put.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-02-16 23:16:54 +0000
committerEric Wong <normalperson@yhbt.net>2012-02-16 23:38:03 +0000
commitc74c98a551f3912de8b5f3519b49cbad257e9a8e (patch)
tree53cc90ed8a826dc90aefd50f4041779a65bf4abf /http_put.c
parentf63052147711e2bc650ded2ffea25cd81cc1f168 (diff)
downloadcmogstored-c74c98a551f3912de8b5f3519b49cbad257e9a8e.tar.gz
This more closely matches the behavior of Perlbal/mogstored and
can lead to better performance.  Issuing repeated MKCOL requests
can be expensive (even with caching), so remove support for it.
Diffstat (limited to 'http_put.c')
-rw-r--r--http_put.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/http_put.c b/http_put.c
index 08a3619..cefb591 100644
--- a/http_put.c
+++ b/http_put.c
@@ -244,6 +244,9 @@ void mog_http_put(struct mog_http *http, char *buf, size_t buf_len)
                 return;
         }
 
+        if (mog_mkpath_for(http->svc, path) != 0)
+                goto err;
+
         http->forward = mog_file_open_put(http->svc, path, open_flags);
         if (http->forward == NULL)
                 goto err;