1
0

HTTP Server can now parse multipart/form-data forms; better architecture.

This commit is contained in:
madmaxoft
2013-10-04 13:07:57 +02:00
parent 9a33732f6a
commit 1012fd82fd
8 changed files with 342 additions and 185 deletions

View File

@@ -24,13 +24,14 @@
class cDebugCallbacks :
public cHTTPServer::cCallbacks
public cHTTPServer::cCallbacks,
protected cHTTPFormParser::cCallbacks
{
virtual void OnRequestBegun(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) override
{
if (cHTTPFormParser::HasFormData(a_Request))
{
a_Request.SetUserData(new cHTTPFormParser(a_Request));
a_Request.SetUserData(new cHTTPFormParser(a_Request, *this));
}
}
@@ -79,6 +80,23 @@ class cDebugCallbacks :
}
virtual void OnFileStart(cHTTPFormParser & a_Parser, const AString & a_FileName) override
{
// TODO
}
virtual void OnFileData(cHTTPFormParser & a_Parser, const char * a_Data, int a_Size) override
{
// TODO
}
virtual void OnFileEnd(cHTTPFormParser & a_Parser) override
{
// TODO
}
} g_DebugCallbacks;