mirror of https://github.com/ceph/ceph
rgw: switch mongoose to civetweb
Fixes: #7054 mongoose is now GPL, using the civetweb fork instead. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
parent
d8bafaebd0
commit
f2f74754c9
|
@ -7,3 +7,6 @@
|
|||
[submodule "src/mongoose"]
|
||||
path = src/mongoose
|
||||
url = git://github.com/ceph/mongoose.git
|
||||
[submodule "src/civetweb"]
|
||||
path = src/civetweb
|
||||
url = git@github.com:ceph/civetweb
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 400f29c108b35fe40f7290d3fff62c6892801e13
|
|
@ -51,6 +51,8 @@ LIBRGW_DEPS += \
|
|||
-lfcgi \
|
||||
-ldl
|
||||
|
||||
CIVETWEB = civetweb
|
||||
|
||||
radosgw_SOURCES = \
|
||||
rgw/rgw_resolve.cc \
|
||||
rgw/rgw_rest.cc \
|
||||
|
@ -69,9 +71,10 @@ radosgw_SOURCES = \
|
|||
rgw/rgw_swift.cc \
|
||||
rgw/rgw_swift_auth.cc \
|
||||
rgw/rgw_loadgen.cc \
|
||||
rgw/rgw_mongoose.cc \
|
||||
mongoose/mongoose.c \
|
||||
rgw/rgw_civetweb.cc \
|
||||
$(CIVETWEB)/src/civetweb.c \
|
||||
rgw/rgw_main.cc
|
||||
radosgw_CFLAGS = -I$(CIVETWEB)/include
|
||||
radosgw_LDADD = $(LIBRGW) $(LIBRGW_DEPS) $(RESOLV_LIBS) $(CEPH_GLOBAL)
|
||||
bin_PROGRAMS += radosgw
|
||||
|
||||
|
@ -154,6 +157,6 @@ noinst_HEADERS += \
|
|||
rgw/rgw_user.h \
|
||||
rgw/rgw_bucket.h \
|
||||
rgw/rgw_keystone.h \
|
||||
rgw/rgw_mongoose.h \
|
||||
mongoose/mongoose.h
|
||||
rgw/rgw_civetweb.h \
|
||||
civetweb/civetweb.h
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include "mongoose/mongoose.h"
|
||||
#include "rgw_mongoose.h"
|
||||
#include "civetweb/civetweb.h"
|
||||
#include "rgw_civetweb.h"
|
||||
|
||||
|
||||
#define dout_subsys ceph_subsys_rgw
|
|
@ -53,9 +53,9 @@
|
|||
#include "rgw_tools.h"
|
||||
#include "rgw_resolve.h"
|
||||
#include "rgw_loadgen.h"
|
||||
#include "rgw_mongoose.h"
|
||||
#include "rgw_civetweb.h"
|
||||
|
||||
#include "mongoose/mongoose.h"
|
||||
#include "civetweb/civetweb.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
@ -673,7 +673,7 @@ void RGWLoadGenProcess::handle_request(RGWRequest *r)
|
|||
}
|
||||
|
||||
|
||||
static int mongoose_callback(struct mg_connection *conn) {
|
||||
static int civetweb_callback(struct mg_connection *conn) {
|
||||
struct mg_request_info *req_info = mg_get_request_info(conn);
|
||||
RGWProcessEnv *pe = (RGWProcessEnv *)req_info->user_data;
|
||||
RGWRados *store = pe->store;
|
||||
|
@ -928,7 +928,7 @@ public:
|
|||
|
||||
struct mg_callbacks cb;
|
||||
memset((void *)&cb, 0, sizeof(cb));
|
||||
cb.begin_request = mongoose_callback;
|
||||
cb.begin_request = civetweb_callback;
|
||||
ctx = mg_start(&cb, &env, (const char **)&options);
|
||||
|
||||
if (!ctx) {
|
||||
|
@ -1122,7 +1122,7 @@ int main(int argc, const char **argv)
|
|||
RGWProcessEnv fcgi_pe = { store, &rest, olog, 0 };
|
||||
|
||||
fe = new RGWFCGXFrontend(fcgi_pe, config);
|
||||
} else if (framework == "mongoose") {
|
||||
} else if (framework == "civetweb" || framework == "mongoose") {
|
||||
string err;
|
||||
|
||||
int port;
|
||||
|
|
Loading…
Reference in New Issue