summaryrefslogtreecommitdiffstats
path: root/src/HTTPServer
diff options
context:
space:
mode:
Diffstat (limited to 'src/HTTPServer')
-rw-r--r--src/HTTPServer/EnvelopeParser.h3
-rw-r--r--src/HTTPServer/HTTPFormParser.h3
-rw-r--r--src/HTTPServer/HTTPServer.cpp4
-rw-r--r--src/HTTPServer/HTTPServer.h4
-rw-r--r--src/HTTPServer/MultipartParser.h3
5 files changed, 16 insertions, 1 deletions
diff --git a/src/HTTPServer/EnvelopeParser.h b/src/HTTPServer/EnvelopeParser.h
index 6430fbebf..866bed11d 100644
--- a/src/HTTPServer/EnvelopeParser.h
+++ b/src/HTTPServer/EnvelopeParser.h
@@ -19,6 +19,9 @@ public:
class cCallbacks
{
public:
+ // Force a virtual destructor in descendants:
+ virtual ~cCallbacks() {}
+
/// Called when a full header line is parsed
virtual void OnHeaderLine(const AString & a_Key, const AString & a_Value) = 0;
} ;
diff --git a/src/HTTPServer/HTTPFormParser.h b/src/HTTPServer/HTTPFormParser.h
index a554ca5a4..f2a509cb8 100644
--- a/src/HTTPServer/HTTPFormParser.h
+++ b/src/HTTPServer/HTTPFormParser.h
@@ -36,6 +36,9 @@ public:
class cCallbacks
{
public:
+ // Force a virtual destructor in descendants:
+ virtual ~cCallbacks() {}
+
/// Called when a new file part is encountered in the form data
virtual void OnFileStart(cHTTPFormParser & a_Parser, const AString & a_FileName) = 0;
diff --git a/src/HTTPServer/HTTPServer.cpp b/src/HTTPServer/HTTPServer.cpp
index f6f5b0f8b..4e9195a00 100644
--- a/src/HTTPServer/HTTPServer.cpp
+++ b/src/HTTPServer/HTTPServer.cpp
@@ -29,6 +29,8 @@ class cDebugCallbacks :
{
virtual void OnRequestBegun(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) override
{
+ UNUSED(a_Connection);
+
if (cHTTPFormParser::HasFormData(a_Request))
{
a_Request.SetUserData(new cHTTPFormParser(a_Request, *this));
@@ -38,6 +40,8 @@ class cDebugCallbacks :
virtual void OnRequestBody(cHTTPConnection & a_Connection, cHTTPRequest & a_Request, const char * a_Data, int a_Size) override
{
+ UNUSED(a_Connection);
+
cHTTPFormParser * FormParser = (cHTTPFormParser *)(a_Request.GetUserData());
if (FormParser != NULL)
{
diff --git a/src/HTTPServer/HTTPServer.h b/src/HTTPServer/HTTPServer.h
index 24baf8c95..383abb4b6 100644
--- a/src/HTTPServer/HTTPServer.h
+++ b/src/HTTPServer/HTTPServer.h
@@ -37,6 +37,8 @@ public:
class cCallbacks
{
public:
+ virtual ~cCallbacks() {}
+
/** Called when a new request arrives over a connection and its headers have been parsed.
The request body needn't have arrived yet.
*/
@@ -50,7 +52,7 @@ public:
} ;
cHTTPServer(void);
- ~cHTTPServer();
+ virtual ~cHTTPServer();
/// Initializes the server on the specified ports
bool Initialize(const AString & a_PortsIPv4, const AString & a_PortsIPv6);
diff --git a/src/HTTPServer/MultipartParser.h b/src/HTTPServer/MultipartParser.h
index d853929ed..77695fe4a 100644
--- a/src/HTTPServer/MultipartParser.h
+++ b/src/HTTPServer/MultipartParser.h
@@ -22,6 +22,9 @@ public:
class cCallbacks
{
public:
+ // Force a virtual destructor in descendants:
+ virtual ~cCallbacks() {}
+
/// Called when a new part starts
virtual void OnPartStart(void) = 0;