Skip to content
Snippets Groups Projects
Commit 065de282 authored by rswindell's avatar rswindell
Browse files

Created WEB_OPT_DEBUG_RX for enabling debug of received requests.

parent 9ec5bd9e
Branches
Tags
No related merge requests found
...@@ -46,6 +46,7 @@ static ini_bitdesc_t ftp_options[] = { ...@@ -46,6 +46,7 @@ static ini_bitdesc_t ftp_options[] = {
static ini_bitdesc_t web_options[] = { static ini_bitdesc_t web_options[] = {
{ WEB_OPT_DEBUG_RX ,"DEBUG_RX" },
{ WEB_OPT_DEBUG_TX ,"DEBUG_TX" }, { WEB_OPT_DEBUG_TX ,"DEBUG_TX" },
{ WEB_OPT_VIRTUAL_HOSTS ,"VIRTUAL_HOSTS" }, { WEB_OPT_VIRTUAL_HOSTS ,"VIRTUAL_HOSTS" },
......
...@@ -754,6 +754,7 @@ static int sockreadline(http_session_t * session, time_t timeout, char *buf, siz ...@@ -754,6 +754,7 @@ static int sockreadline(http_session_t * session, time_t timeout, char *buf, siz
else else
buf[i]=0; buf[i]=0;
if(startup->options&WEB_OPT_DEBUG_RX)
lprintf("%04d RX: %s",session->socket,buf); lprintf("%04d RX: %s",session->socket,buf);
return(0); return(0);
} }
......
...@@ -89,8 +89,9 @@ typedef struct { ...@@ -89,8 +89,9 @@ typedef struct {
BOOL recycle_now; BOOL recycle_now;
} web_startup_t; } web_startup_t;
#define WEB_OPT_DEBUG_TX (1<<0) /* Log all transmitted responses */ #define WEB_OPT_DEBUG_RX (1<<0) /* Log all received requests */
#define WEB_OPT_VIRTUAL_HOSTS (1<<1) /* Use virutal host html subdirs */ #define WEB_OPT_DEBUG_TX (1<<1) /* Log all transmitted responses */
#define WEB_OPT_VIRTUAL_HOSTS (1<<4) /* Use virutal host html subdirs */
#ifdef DLLEXPORT #ifdef DLLEXPORT
#undef DLLEXPORT #undef DLLEXPORT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment