From: Abhishek Lekshmanan Date: Tue, 27 Mar 2018 14:19:47 +0000 (+0200) Subject: rgw: update civetweb to 1.1 X-Git-Tag: v12.2.13~244^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4c8275fdfa1f8dad4110e1c9870dd62b325a7d43;p=ceph.git rgw: update civetweb to 1.1 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 (cherry picked from commit 64275d516bcc570d1a9b9fea644bcab34483db35) --- diff --git a/src/civetweb b/src/civetweb index bdaa39a1ebb..1433012e72f 160000 --- a/src/civetweb +++ b/src/civetweb @@ -1 +1 @@ -Subproject commit bdaa39a1ebb01ae38edee9e97a3d46972cb68ac9 +Subproject commit 1433012e72f2b7f8d06750a29310725cd4368f99 diff --git a/src/rgw/rgw_civetweb.cc b/src/rgw/rgw_civetweb.cc index c3f585cfc21..bad04be4d5d 100644 --- a/src/rgw/rgw_civetweb.cc +++ b/src/rgw/rgw_civetweb.cc @@ -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); } diff --git a/src/rgw/rgw_civetweb_frontend.cc b/src/rgw/rgw_civetweb_frontend.cc index 33e00144647..7d7325d9439 100644 --- a/src/rgw/rgw_civetweb_frontend.cc +++ b/src/rgw/rgw_civetweb_frontend.cc @@ -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