]> 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)
committerAbhishek Lekshmanan <abhishek@suse.com>
Fri, 13 Apr 2018 17:19:13 +0000 (19:19 +0200)
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>
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 c28fac47652ef2d03ddda920937523e91d1a53c2..2da2912ed5094bff0d6bf5d84cd9b37edc08513e 100644 (file)
@@ -92,7 +92,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;
@@ -138,7 +138,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