option(HAVE_LIBZFS "LibZFS is enabled" OFF)
option(ENABLE_COVERAGE "Coverage is enabled" OFF)
option(PG_DEBUG_REFS "PG Ref debugging is enabled" OFF)
+# we want to include civetweb.h as "civetweb/civetweb.h". Make it so.
+execute_process(
+COMMAND rm -f "${CMAKE_BINARY_DIR}/src/include/civetweb"
+COMMAND mkdir -p "${CMAKE_BINARY_DIR}/src/include"
+COMMAND ln -s "${CMAKE_SOURCE_DIR}/src/civetweb/include"
+ "${CMAKE_BINARY_DIR}/src/include/civetweb")
option(WITH_TESTS "enable the build of ceph-test package scripts/binaries" ON)
add_library(civetweb_common_objs OBJECT ${civetweb_common_files})
target_include_directories(civetweb_common_objs PUBLIC
"${CMAKE_SOURCE_DIR}/src/civetweb/include")
+ set_property(TARGET civetweb_common_objs
+ APPEND PROPERTY COMPILE_DEFINITIONS USE_IPV6=1)
if(HAVE_SSL)
set_property(TARGET civetweb_common_objs
APPEND PROPERTY COMPILE_DEFINITIONS NO_SSL_DL=1)
-Subproject commit e12494070432b85d5ffce7dece81c0baad457a5f
+Subproject commit cc0dfa11dadfca8a7021687aa537a3d377f244cb
void RGWCivetWeb::init_env(CephContext *cct)
{
env.init(cct);
- struct mg_request_info* const info = mg_get_request_info(conn);
+ const struct mg_request_info* info = mg_get_request_info(conn);
if (! info) {
return;
}
for (int i = 0; i < info->num_headers; i++) {
- struct mg_request_info::mg_header* const header = &info->http_headers[i];
+ const struct mg_request_info::mg_header* header = &info->http_headers[i];
const boost::string_ref name(header->name);
const auto& value = header->value;
static int civetweb_callback(struct mg_connection* conn)
{
- struct mg_request_info* const req_info = mg_get_request_info(conn);
+ const struct mg_request_info* const req_info = mg_get_request_info(conn);
return static_cast<RGWCivetWebFrontend *>(req_info->user_data)->process(conn);
}
set_conf_default(conf_map, "decode_url", "no");
set_conf_default(conf_map, "enable_keep_alive", "yes");
conf_map["listening_ports"] = conf->get_val("port", "80");
+ set_conf_default(conf_map, "validate_http_method", "no");
+ set_conf_default(conf_map, "canonicalize_url_path", "no");
/* Set run_as_user. This will cause civetweb to invoke setuid() and setgid()
* based on pw_uid and pw_gid obtained from pw_name. */