Added debu output

Signed-off-by: Tyrolyean <tyrolyean@tyrolyean.net>
This commit is contained in:
Tyrolyean 2020-04-26 22:15:20 +02:00
parent f8f513145d
commit 76c4529999
No known key found for this signature in database
GPG key ID: 81EC9BAC5E9667C6

View file

@ -89,10 +89,11 @@ void* client_handle_async(void* params){
} }
bzero(buf, sizeof(buf)); bzero(buf, sizeof(buf));
n = read(fds[i].fd, buf, sizeof(buf)); n = read(fds[i].fd, buf, sizeof(buf)-1);
if (n <= 0) { if (n <= 0) {
goto closeup; goto closeup;
} }
printf("%lu:[%s]", i, buf);
if(i==0 && !in_body){ if(i==0 && !in_body){
@ -119,7 +120,7 @@ void* client_handle_async(void* params){
} }
} else if(i==0 && !after_body){ } else if(i==0 && !after_body){
/* We keep the body until we have it completetly /* We keep the body until we have it completely
*/ */
in_len += n; in_len += n;
input_buffer = realloc(input_buffer, in_len); input_buffer = realloc(input_buffer, in_len);