From 76c4529999026d13b6bc60d52e0c98f5a2fe82dc Mon Sep 17 00:00:00 2001 From: Tyrolyean Date: Sun, 26 Apr 2020 22:15:20 +0200 Subject: [PATCH] Added debu output Signed-off-by: Tyrolyean --- src/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 6a46357..712e51b 100644 --- a/src/main.c +++ b/src/main.c @@ -89,10 +89,11 @@ void* client_handle_async(void* params){ } bzero(buf, sizeof(buf)); - n = read(fds[i].fd, buf, sizeof(buf)); + n = read(fds[i].fd, buf, sizeof(buf)-1); if (n <= 0) { goto closeup; } + printf("%lu:[%s]", i, buf); if(i==0 && !in_body){ @@ -119,7 +120,7 @@ void* client_handle_async(void* params){ } } 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; input_buffer = realloc(input_buffer, in_len);