diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-08-28 16:43:08 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-08-28 17:22:05 +0200 |
commit | 84a25639b36644a20591ad0b141476c6c7d261a6 (patch) | |
tree | cd03e510585407dad562e99b3f41f9396b9c105b /sources/ogAdmServer.cpp | |
parent | 20dcb0a906b55c4e3f52bf2b994d696c4f42cc70 (diff) |
#915 add syslog debugging for HTTP request
Display initial 32 bytes of the HTTP request.
Diffstat (limited to 'sources/ogAdmServer.cpp')
-rw-r--r-- | sources/ogAdmServer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index 75f0a2c..8362796 100644 --- a/sources/ogAdmServer.cpp +++ b/sources/ogAdmServer.cpp @@ -3991,6 +3991,10 @@ static int og_client_state_process_payload_rest(struct og_client *cli) json_t *root = NULL; int err = 0; + syslog(LOG_DEBUG, "%s:%hu %.32s ...\n", + inet_ntoa(cli->addr.sin_addr), + ntohs(cli->addr.sin_port), cli->buf); + if (!strncmp(cli->buf, "GET", strlen("GET"))) { method = OG_METHOD_GET; cmd = cli->buf + strlen("GET") + 2; @@ -4223,10 +4227,6 @@ static void og_client_read_cb(struct ev_loop *loop, struct ev_io *io, int events cli->state = OG_CLIENT_PROCESSING_REQUEST; /* fall through. */ case OG_CLIENT_PROCESSING_REQUEST: - syslog(LOG_DEBUG, "processing request from %s:%hu\n", - inet_ntoa(cli->addr.sin_addr), - ntohs(cli->addr.sin_port)); - if (cli->rest) ret = og_client_state_process_payload_rest(cli); else |