diff options
Diffstat (limited to 'src/http.c')
-rw-r--r-- | src/http.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -16,6 +16,8 @@ int ParseHTTPInput(char *buf, struct message *m) { if ( !(*buf) ) return 0; */ + debugmsg("Parsing http input: %s", buf); + /* initialize message block */ memset(m, 0, sizeof (struct message) ); @@ -93,11 +95,13 @@ int _read(struct mansession *s, struct message *m) { s->inlen -= clength; pthread_mutex_unlock(&s->lock); } - debugmsg("method: %s", method); - debugmsg("clength: %d", clength); - debugmsg("formdata: %s", formdata); - debugmsg("s->inbuf: %s", s->inbuf); - debugmsg("s->inlen: %d", s->inlen); + if (debug) { + debugmsg("method: %s", method); + debugmsg("clength: %d", clength); + debugmsg("formdata: %s", formdata); + debugmsg("s->inbuf: %s", s->inbuf); + debugmsg("s->inlen: %d", s->inlen); + } BuildHTTPHeader(header); pthread_mutex_lock(&s->lock); @@ -121,6 +125,7 @@ int _read(struct mansession *s, struct message *m) { memcpy(formdata, line+6, strstr(line, " HTTP")-line-6); } else if ( !strncasecmp(line, "Content-Length: ", 16) ) { clength = atoi(line+16); + debugmsg("clength=%d", clength); } } } else if (res < 0) |