mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-31 15:11:08 +00:00
Don't record http method (#754)
Co-authored-by: Heran Yang <heran.yang@seafile.com>
This commit is contained in:
@@ -2327,7 +2327,6 @@ request_finish_cb (evhtp_request_t *req, void *arg)
|
|||||||
return EVHTP_RES_OK;
|
return EVHTP_RES_OK;
|
||||||
|
|
||||||
g_free (info->url_path);
|
g_free (info->url_path);
|
||||||
g_free (info->method);
|
|
||||||
g_free (info);
|
g_free (info);
|
||||||
return EVHTP_RES_OK;
|
return EVHTP_RES_OK;
|
||||||
}
|
}
|
||||||
@@ -2335,12 +2334,9 @@ request_finish_cb (evhtp_request_t *req, void *arg)
|
|||||||
static evhtp_res
|
static evhtp_res
|
||||||
access_headers_cb (evhtp_request_t *req, evhtp_headers_t *hdr, void *arg)
|
access_headers_cb (evhtp_request_t *req, evhtp_headers_t *hdr, void *arg)
|
||||||
{
|
{
|
||||||
htp_method method = evhtp_request_get_method (req);
|
|
||||||
const char *method_str = htparser_get_methodstr_m (method);
|
|
||||||
RequestInfo *info = NULL;
|
RequestInfo *info = NULL;
|
||||||
info = g_new0 (RequestInfo, 1);
|
info = g_new0 (RequestInfo, 1);
|
||||||
info->url_path = g_strdup (req->uri->path->full);
|
info->url_path = g_strdup (req->uri->path->full);
|
||||||
info->method = g_strdup (method_str);
|
|
||||||
|
|
||||||
gettimeofday (&info->start, NULL);
|
gettimeofday (&info->start, NULL);
|
||||||
|
|
||||||
|
@@ -3017,7 +3017,6 @@ http_request_finish_cb (evhtp_request_t *req, void *arg)
|
|||||||
return EVHTP_RES_OK;
|
return EVHTP_RES_OK;
|
||||||
|
|
||||||
g_free (info->url_path);
|
g_free (info->url_path);
|
||||||
g_free (info->method);
|
|
||||||
g_free (info);
|
g_free (info);
|
||||||
return EVHTP_RES_OK;
|
return EVHTP_RES_OK;
|
||||||
}
|
}
|
||||||
@@ -3025,12 +3024,9 @@ http_request_finish_cb (evhtp_request_t *req, void *arg)
|
|||||||
static evhtp_res
|
static evhtp_res
|
||||||
http_request_start_cb (evhtp_request_t *req, evhtp_headers_t *hdr, void *arg)
|
http_request_start_cb (evhtp_request_t *req, evhtp_headers_t *hdr, void *arg)
|
||||||
{
|
{
|
||||||
htp_method method = evhtp_request_get_method (req);
|
|
||||||
const char *method_str = htparser_get_methodstr_m (method);
|
|
||||||
RequestInfo *info = NULL;
|
RequestInfo *info = NULL;
|
||||||
info = g_new0 (RequestInfo, 1);
|
info = g_new0 (RequestInfo, 1);
|
||||||
info->url_path = g_strdup (req->uri->path->full);
|
info->url_path = g_strdup (req->uri->path->full);
|
||||||
info->method = g_strdup (method_str);
|
|
||||||
|
|
||||||
gettimeofday (&info->start, NULL);
|
gettimeofday (&info->start, NULL);
|
||||||
|
|
||||||
|
@@ -28,7 +28,6 @@ struct _HttpServerStruct {
|
|||||||
typedef struct RequestInfo {
|
typedef struct RequestInfo {
|
||||||
struct timeval start;
|
struct timeval start;
|
||||||
char *url_path;
|
char *url_path;
|
||||||
char *method;
|
|
||||||
} RequestInfo;
|
} RequestInfo;
|
||||||
|
|
||||||
typedef struct _HttpServerStruct HttpServerStruct;
|
typedef struct _HttpServerStruct HttpServerStruct;
|
||||||
|
Reference in New Issue
Block a user