From 2f90b203abb638b8c18db166102a0ef183c9b213 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 1 Mar 2012 12:23:35 +0100 Subject: Only print *data_size bytes from data to debug output. Added connection time to debug output. --- server/src/httpd.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'server') diff --git a/server/src/httpd.cc b/server/src/httpd.cc index 1c0575a..62e4c9f 100644 --- a/server/src/httpd.cc +++ b/server/src/httpd.cc @@ -38,6 +38,7 @@ #include #include +#include #include "debug.h" @@ -68,10 +69,14 @@ static int request_handler(void *cls, unsigned int *data_size, void **con_cls) { + time_t now = time(NULL); + DEBUG(httpd, "Request time: %s", ctime(&now)); DEBUG(httpd, "request_handler: cls(%p) con(%p) url(%s) method(%s)" " version(%s) *con_cls(%p)\n", cls, con, url, method, version, *con_cls); - DEBUG(httpd, "request_handler: *data_size(%u) data:[%s]\n", *data_size, data); + std::string datastr; datastr.append(data, *data_size); + DEBUG(httpd, "request_handler: *data_size(%u) data:[%s]\n", + *data_size, datastr.c_str()); int ret = MHD_YES; -- cgit v1.2.3