Adds support for basic Multipart process

Adjustments will be needed, for instance: the logging support is still missing
This commit is contained in:
Felipe Zimmerle
2015-07-17 15:12:15 -03:00
parent d0b7a9966d
commit 5d5e10bfde
8 changed files with 518 additions and 6 deletions

View File

@@ -110,6 +110,32 @@ class Assay {
int processURI(const char *uri, const char *protocol,
const char *http_version);
/**
* Types of request body that ModSecurity may give a special treatment
* for the data.
*/
enum RequestBodyType {
/**
*
*/
UnknownFormat,
/**
*
*/
MultiPartRequestBody,
/**
*
*/
WWWFormUrlEncoded,
/**
*
*/
JSONRequestBody,
/**
*
*/
XMLRequestBody
};
int processRequestHeaders();
int addRequestHeader(const std::string& key, const std::string& value);
@@ -185,6 +211,7 @@ class Assay {
double m_ARGScombinedSize;
/** TODO: Support to save double in the storage. */
std::string *m_ARGScombinedSizeStr;
RequestBodyType m_requestBodyType;
std::ostringstream m_requestBody;
std::ostringstream m_responseBody;