Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uninitialized Variable and sendfile call #10

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/th_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/th_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading