diff --git a/Jupiter/HTTP_Server.cpp b/Jupiter/HTTP_Server.cpp index 249223a..e0ad22f 100644 --- a/Jupiter/HTTP_Server.cpp +++ b/Jupiter/HTTP_Server.cpp @@ -540,7 +540,8 @@ int Jupiter::HTTP::Server::Data::process_request(HTTPSession &session) if (command == HTTPCommand::GET) result += *content_result; - delete content_result; + if (content->free_result) + delete content_result; session.sock.send(result); } diff --git a/Jupiter/HTTP_Server.h b/Jupiter/HTTP_Server.h index f02edfc..c190c17 100644 --- a/Jupiter/HTTP_Server.h +++ b/Jupiter/HTTP_Server.h @@ -51,6 +51,7 @@ namespace Jupiter struct JUPITER_API Content { + bool free_result = true; Jupiter::HTTP::Server::HTTPFunction *function; // function to generate content data Jupiter::StringS name; // name of the content unsigned int name_checksum; // name.calcChecksum() diff --git a/Release/Jupiter.lib b/Release/Jupiter.lib index 1b1a905..92dee01 100644 Binary files a/Release/Jupiter.lib and b/Release/Jupiter.lib differ