summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/httpd.cc7
1 files changed, 6 insertions, 1 deletions
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 <string.h>
#include <microhttpd.h>
+#include <time.h>
#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;