]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: update civetweb to 1.1
authorAbhishek Lekshmanan <abhishek@suse.com>
Tue, 27 Mar 2018 14:19:47 +0000 (16:19 +0200)
committerCasey Bodley <cbodley@redhat.com>
Mon, 6 May 2019 22:25:59 +0000 (18:25 -0400)
Introduces the following additions in rgw:
- allow_unicode_in_urls introduced with a corresponding downstream commit in
civetweb, as the newer version of civetweb validates that urls are url encoded
which swifttests do not follow, so introduce this as a configurable which we set
as true
- mg header struct changes in civetweb update, use auto here
- drop info->uri and use local_uri instead as the former is deprecated

wip: rgw: civetweb fixes for v1.1 upgrade

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 64275d516bcc570d1a9b9fea644bcab34483db35)

src/civetweb
src/rgw/rgw_civetweb.cc
src/rgw/rgw_civetweb_frontend.cc

index bdaa39a1ebb01ae38edee9e97a3d46972cb68ac9..1433012e72f2b7f8d06750a29310725cd4368f99 160000 (submodule)
@@ -1 +1 @@
-Subproject commit bdaa39a1ebb01ae38edee9e97a3d46972cb68ac9
+Subproject commit 1433012e72f2b7f8d06750a29310725cd4368f99
index c3f585cfc21863624d3212eace00d358980578aa..bad04be4d5d108e131a451d6d1ed7830420f3742 100644 (file)
@@ -89,7 +89,7 @@ int RGWCivetWeb::init_env(CephContext *cct)
   }
 
   for (int i = 0; i < info->num_headers; i++) {
-    const struct mg_request_info::mg_header* header = &info->http_headers[i];
+    const auto header = &info->http_headers[i];
 
     if (header->name == nullptr || header->value==nullptr) {
       lderr(cct) << "client supplied malformatted headers" << dendl;
@@ -132,7 +132,7 @@ int RGWCivetWeb::init_env(CephContext *cct)
   env.set("REQUEST_METHOD", info->request_method);
   env.set("HTTP_VERSION", info->http_version);
   env.set("REQUEST_URI", info->request_uri); // get the full uri, we anyway handle abs uris later
-  env.set("SCRIPT_URI", info->uri); /* FIXME */
+  env.set("SCRIPT_URI", info->local_uri);
   if (info->query_string) {
     env.set("QUERY_STRING", info->query_string);
   }
index 33e00144647ee8a337f01b9c27ad9dff940fe3a4..7d7325d9439c3e3998639911f1bae944d07c3344 100644 (file)
@@ -58,6 +58,7 @@ int RGWCivetWebFrontend::run()
   set_conf_default(conf_map, "validate_http_method", "no");
   set_conf_default(conf_map, "canonicalize_url_path", "no");
   set_conf_default(conf_map, "enable_auth_domain_check", "no");
+  set_conf_default(conf_map, "allow_unicode_in_urls", "yes");
 
   std::string listening_ports;
   // support multiple port= entries