]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_http_client.cc
update sources to 12.2.7
[ceph.git] / ceph / src / rgw / rgw_http_client.cc
index 72c8a14f1db9d06c92884aa63b8b7038b8151168..61146748d635f58be05ec10e961110341c196443 100644 (file)
@@ -350,8 +350,13 @@ static curl_slist *headers_to_slist(param_vec_t& headers)
       }
     }
 
-    val.append(": ");
-    val.append(p.second);
+    // curl won't send headers with empty values unless it ends with a ; instead
+    if (p.second.empty()) {
+      val.append(1, ';');
+    } else {
+      val.append(": ");
+      val.append(p.second);
+    }
     h = curl_slist_append(h, val.c_str());
   }