2019-10-09 00:54:44 +02:00
|
|
|
From 8c3ee18d3eaf3e8a00dce677386dfae649ea309e Mon Sep 17 00:00:00 2001
|
|
|
|
From: Ultima1252 <ultima1252@gmail.com>
|
|
|
|
Date: Mon, 15 Jan 2018 17:05:52 -0800
|
|
|
|
Subject: [PATCH] Update http-server.c
|
|
|
|
|
|
|
|
diff --git a/server/http-server.c b/server/http-server.c
|
|
|
|
index b0319b9..fdfe8fe 100644
|
|
|
|
--- a/server/http-server.c
|
|
|
|
+++ b/server/http-server.c
|
|
|
|
@@ -2122,7 +2122,7 @@ http_server_run (void *arg)
|
|
|
|
|
|
|
|
http_request_init (server);
|
|
|
|
|
|
|
|
- evhtp_use_threads (priv->evhtp, NULL, server->worker_threads, NULL);
|
|
|
|
+ evhtp_use_threads_wexit (priv->evhtp, NULL, NULL, server->worker_threads, NULL);
|
|
|
|
|
|
|
|
struct timeval tv;
|
|
|
|
tv.tv_sec = CLEANING_INTERVAL_SEC;
|
|
|
|
|
|
|
|
From 84038d1665423b5d72ee840318a337a1907c693b Mon Sep 17 00:00:00 2001
|
|
|
|
From: Ultima1252 <ultima1252@gmail.com>
|
|
|
|
Date: Mon, 15 Jan 2018 17:13:02 -0800
|
|
|
|
Subject: [PATCH] Update upload-file.c
|
|
|
|
|
|
|
|
---
|
|
|
|
server/upload-file.c | 30 +++++++++++++++---------------
|
|
|
|
1 file changed, 15 insertions(+), 15 deletions(-)
|
|
|
|
adjusted by schmittlauch
|
|
|
|
|
2019-12-26 01:28:02 +01:00
|
|
|
--- a/server/upload-file.c 2019-12-26 00:43:14.743019721 +0100
|
|
|
|
+++ b/server/upload-file.new 2019-12-26 01:05:11.166580920 +0100
|
2019-12-27 20:13:34 +01:00
|
|
|
@@ -2306,7 +2306,7 @@
|
|
|
|
/* Set keepalive to 0. This will cause evhtp to close the
|
|
|
|
* connection after sending the reply.
|
|
|
|
*/
|
|
|
|
- req->keepalive = 0;
|
|
|
|
+ evhtp_request_set_keepalive(req, 0);
|
|
|
|
|
|
|
|
fsm->state = RECV_ERROR;
|
|
|
|
}
|
2019-12-27 19:52:45 +01:00
|
|
|
@@ -2607,8 +2607,8 @@
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Set up per-request hooks, so that we can read file data piece by piece. */
|
|
|
|
- evhtp_set_hook (&req->hooks, evhtp_hook_on_read, upload_read_cb, fsm);
|
|
|
|
- evhtp_set_hook (&req->hooks, evhtp_hook_on_request_fini, upload_finish_cb, fsm);
|
|
|
|
+ evhtp_callback_set_hook (req, evhtp_hook_on_read, upload_read_cb, fsm);
|
|
|
|
+ evhtp_callback_set_hook (req, evhtp_hook_on_request_fini, upload_finish_cb, fsm);
|
|
|
|
/* Set arg for upload_cb or update_cb. */
|
|
|
|
req->cbarg = fsm;
|
|
|
|
|
2019-12-27 20:13:34 +01:00
|
|
|
@@ -2623,7 +2623,7 @@
|
|
|
|
/* Set keepalive to 0. This will cause evhtp to close the
|
|
|
|
* connection after sending the reply.
|
|
|
|
*/
|
|
|
|
- req->keepalive = 0;
|
|
|
|
+ evhtp_request_set_keepalive(req, 0);
|
|
|
|
send_error_reply (req, EVHTP_RES_BADREQ, err_msg);
|
|
|
|
|
|
|
|
g_free (repo_id);
|
2019-12-26 01:28:02 +01:00
|
|
|
@@ -2724,32 +2724,32 @@
|
|
|
|
g_free (cluster_shared_dir);
|
2019-10-09 00:54:44 +02:00
|
|
|
|
|
|
|
cb = evhtp_set_regex_cb (htp, "^/upload-api/.*", upload_api_cb, NULL);
|
|
|
|
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
|
|
|
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
|
|
|
|
|
|
|
cb = evhtp_set_regex_cb (htp, "^/upload-raw-blks-api/.*",
|
|
|
|
upload_raw_blks_api_cb, NULL);
|
|
|
|
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
|
|
|
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
|
|
|
|
|
|
|
cb = evhtp_set_regex_cb (htp, "^/upload-blks-api/.*", upload_blks_api_cb, NULL);
|
|
|
|
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
|
|
|
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
|
|
|
|
|
|
|
/* cb = evhtp_set_regex_cb (htp, "^/upload-blks-aj/.*", upload_blks_ajax_cb, NULL); */
|
|
|
|
- /* evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); */
|
|
|
|
+ /* evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); */
|
|
|
|
|
|
|
|
cb = evhtp_set_regex_cb (htp, "^/upload-aj/.*", upload_ajax_cb, NULL);
|
|
|
|
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
|
|
|
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
|
|
|
|
|
|
|
cb = evhtp_set_regex_cb (htp, "^/update-api/.*", update_api_cb, NULL);
|
|
|
|
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
|
|
|
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
|
|
|
|
|
|
|
cb = evhtp_set_regex_cb (htp, "^/update-blks-api/.*", update_blks_api_cb, NULL);
|
|
|
|
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
|
|
|
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
|
|
|
|
|
|
|
/* cb = evhtp_set_regex_cb (htp, "^/update-blks-aj/.*", update_blks_ajax_cb, NULL); */
|
|
|
|
- /* evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); */
|
2019-12-26 01:28:02 +01:00
|
|
|
+ /* evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); */
|
2019-10-09 00:54:44 +02:00
|
|
|
|
|
|
|
cb = evhtp_set_regex_cb (htp, "^/update-aj/.*", update_ajax_cb, NULL);
|
|
|
|
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
2019-12-26 01:28:02 +01:00
|
|
|
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
|
2019-10-09 00:54:44 +02:00
|
|
|
|
|
|
|
evhtp_set_regex_cb (htp, "^/upload_progress.*", upload_progress_cb, NULL);
|
2019-12-27 19:52:45 +01:00
|
|
|
|
2019-10-18 01:19:43 +02:00
|
|
|
|
2019-12-27 19:52:45 +01:00
|
|
|
From b6c41aae74f1eb285a033125f4a5af578c8efbb6 Mon Sep 17 00:00:00 2001
|
2019-10-09 00:54:44 +02:00
|
|
|
From: Ultima1252 <ultima1252@gmail.com>
|
|
|
|
Date: Mon, 15 Jan 2018 17:13:57 -0800
|
|
|
|
Subject: [PATCH] Update Makefile.am
|
|
|
|
|
|
|
|
---
|
|
|
|
server/Makefile.am | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/server/Makefile.am b/server/Makefile.am
|
|
|
|
index 2491f5e..dd695bd 100644
|
|
|
|
--- a/server/Makefile.am
|
|
|
|
+++ b/server/Makefile.am
|
|
|
|
@@ -114,7 +114,7 @@ seaf_server_SOURCES = \
|
|
|
|
|
|
|
|
seaf_server_LDADD = @CCNET_LIBS@ \
|
|
|
|
$(top_builddir)/lib/libseafile_common.la \
|
|
|
|
- @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ -levhtp \
|
|
|
|
+ @ONIGURUMA_LIBS@ @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ @LIBEVHTP_LIBS@ \
|
|
|
|
$(top_builddir)/common/cdc/libcdc.la \
|
|
|
|
$(top_builddir)/common/db-wrapper/libdbwrapper.la \
|
|
|
|
@SEARPC_LIBS@ @JANSSON_LIBS@ ${LIB_WS32} @ZLIB_LIBS@ \
|
|
|
|
|
|
|
|
From bb2cd57f39450db39c1b6b222b06ac7987f3cd32 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Ultima1252 <ultima1252@gmail.com>
|
|
|
|
Date: Mon, 15 Jan 2018 17:17:27 -0800
|
|
|
|
Subject: [PATCH] Update configure.ac
|
|
|
|
|
|
|
|
---
|
|
|
|
configure.ac | 10 ++++++++++
|
|
|
|
1 file changed, 10 insertions(+)
|
|
|
|
rebased by schmittlauch
|
|
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
|
|
index c6fef89..78dece3 100644
|
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
|
|
|
@@ -194,6 +194,8 @@ ZDB_REQUIRED=2.10
|
|
|
|
CURL_REQUIRED=7.17
|
|
|
|
FUSE_REQUIRED=2.7.3
|
|
|
|
ZLIB_REQUIRED=1.2.0
|
|
|
|
+LIBEVHTP_REQUIRED=1.2.16
|
|
|
|
+ONIGURUMA_REQUIRED=5.9.2
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES(SSL, [openssl])
|
|
|
|
AC_SUBST(SSL_CFLAGS)
|
2019-10-18 01:19:43 +02:00
|
|
|
@@ -189,6 +189,8 @@ ZDB_REQUIRED=2.10
|
|
|
|
CURL_REQUIRED=7.17
|
|
|
|
FUSE_REQUIRED=2.7.3
|
|
|
|
ZLIB_REQUIRED=1.2.0
|
|
|
|
+LIBEVHTP_REQUIRED=1.2.16
|
|
|
|
+ONIGURUMA_REQUIRED=5.9.2
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES(SSL, [openssl])
|
|
|
|
AC_SUBST(SSL_CFLAGS)
|
|
|
|
@@ -222,6 +224,14 @@ PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED])
|
2019-10-09 00:54:44 +02:00
|
|
|
AC_SUBST(ZLIB_CFLAGS)
|
|
|
|
AC_SUBST(ZLIB_LIBS)
|
|
|
|
|
|
|
|
+PKG_CHECK_MODULES(LIBEVHTP, [evhtp >= $LIBEVHTP_REQUIRED])
|
|
|
|
+AC_SUBST(LIBEVHTP_CFLAGS)
|
|
|
|
+AC_SUBST(LIBEVHTP_LIBS)
|
|
|
|
+
|
|
|
|
+PKG_CHECK_MODULES(ONIGURUMA, [oniguruma >= $ONIGURUMA_REQUIRED])
|
|
|
|
+AC_SUBST(ONIGURUMA_CFLAGS)
|
|
|
|
+AC_SUBST(ONIGURUMA_LIBS)
|
|
|
|
+
|
2019-10-18 01:19:43 +02:00
|
|
|
if test x${compile_python} = xyes; then
|
|
|
|
AM_PATH_PYTHON([2.6])
|
|
|
|
if test "$bwin32" = true; then
|