Browse Source

added 'free_result' boolean to HTTP::Content

release/0.19
Jessica James 9 years ago
parent
commit
2a4f67fc1c
  1. 3
      Jupiter/HTTP_Server.cpp
  2. 1
      Jupiter/HTTP_Server.h
  3. BIN
      Release/Jupiter.lib

3
Jupiter/HTTP_Server.cpp

@ -540,7 +540,8 @@ int Jupiter::HTTP::Server::Data::process_request(HTTPSession &session)
if (command == HTTPCommand::GET) if (command == HTTPCommand::GET)
result += *content_result; result += *content_result;
delete content_result; if (content->free_result)
delete content_result;
session.sock.send(result); session.sock.send(result);
} }

1
Jupiter/HTTP_Server.h

@ -51,6 +51,7 @@ namespace Jupiter
struct JUPITER_API Content struct JUPITER_API Content
{ {
bool free_result = true;
Jupiter::HTTP::Server::HTTPFunction *function; // function to generate content data Jupiter::HTTP::Server::HTTPFunction *function; // function to generate content data
Jupiter::StringS name; // name of the content Jupiter::StringS name; // name of the content
unsigned int name_checksum; // name.calcChecksum() unsigned int name_checksum; // name.calcChecksum()

BIN
Release/Jupiter.lib

Binary file not shown.
Loading…
Cancel
Save