]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix PUT without content length (non chunked)
authorYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 3 Nov 2011 23:00:37 +0000 (16:00 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 3 Nov 2011 23:01:28 +0000 (16:01 -0700)
src/rgw/rgw_rest_swift.cc

index 4639cba9c6037544fb2094867440c84760ef7c69..a8fe03a74572a3c57aecb29a9c5c310b623a2e5c 100644 (file)
@@ -262,7 +262,7 @@ int RGWPutObj_REST_SWIFT::get_params()
 
   if (!s->length) {
     const char *encoding = s->env->get("HTTP_TRANSFER_ENCODING");
-    if (encoding && strcmp(encoding, "chunked") != 0)
+    if (!encoding || strcmp(encoding, "chunked") != 0)
       return -ERR_LENGTH_REQUIRED;
 
     chunked_upload = true;