diff --git a/src/th_config.h b/src/th_config.h index c8ac189..fc7d4c4 100644 --- a/src/th_config.h +++ b/src/th_config.h @@ -78,7 +78,7 @@ #if TH_WITH_SENDFILE #if defined(TH_CONFIG_OS_LINUX) -#define TH_CONFIG_WITH_LINUX_SENDFILE 1 +//#define TH_CONFIG_WITH_LINUX_SENDFILE 1 #elif defined(TH_CONFIG_OS_OSX) || defined(TH_CONFIG_OS_FreeBSD) || defined(TH_CONFIG_OS_NetBSD) || defined(TH_CONFIG_OS_OpenBSD) #define TH_CONFIG_WITH_BSD_SENDFILE 1 #endif diff --git a/src/th_request.c b/src/th_request.c index 42d60b7..43b9b5f 100644 --- a/src/th_request.c +++ b/src/th_request.c @@ -540,6 +540,7 @@ th_request_init(th_request* request, th_allocator* allocator) th_heap_string_vec_init(&request->heap_strings, &request->vec_allocator.base); th_buf_vec_init(&request->buffer, request->allocator); request->data_len = 0; + request->content_len = 0; request->content_buf = NULL; request->content_buf_len = 0; request->content_buf_pos = 0;