diff --git a/llamafile/server/client.cpp b/llamafile/server/client.cpp index 2f6e2e52fa..ed622c2d15 100644 --- a/llamafile/server/client.cpp +++ b/llamafile/server/client.cpp @@ -382,7 +382,6 @@ Client::append_http_response_message(char* p, int code, const char* reason) bool Client::send_response(char* p0, char* p, std::string_view content) { - cleanup(); pthread_testcancel(); should_send_error_if_canceled_ = false; diff --git a/llamafile/server/main.cpp b/llamafile/server/main.cpp index 4f0ad4e260..7274fb49c4 100644 --- a/llamafile/server/main.cpp +++ b/llamafile/server/main.cpp @@ -107,6 +107,12 @@ main(int argc, char* argv[]) // install security if (!FLAG_unsecure) { + const char* promises; + if (FLAG_www_root) { + promises = "stdio anet rpath"; + } else { + promises = "stdio anet"; + } if (pledge(0, 0)) { SLOG("warning: this OS doesn't support pledge() security"); } else if (pledge("stdio anet", 0)) {