added: WINIX_RAW_POST_STRING plugin message
this is the raw string sent in POST method (in p1 pointer there is a pointer to std::string object) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@875 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -32,7 +32,8 @@ class PostParser : public HttpSimpleParser
|
||||
size_t log_value_size;
|
||||
int var_index;
|
||||
bool has_winix_post_params_msg;
|
||||
|
||||
bool has_winix_raw_post_msg;
|
||||
std::string raw_post;
|
||||
|
||||
|
||||
protected:
|
||||
@@ -40,7 +41,12 @@ protected:
|
||||
|
||||
virtual int GetChar()
|
||||
{
|
||||
return FCGX_GetChar(in);
|
||||
int c = FCGX_GetChar(in);
|
||||
|
||||
if( c != -1 && has_winix_raw_post_msg )
|
||||
raw_post += c;
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +117,6 @@ public:
|
||||
log_value_size = 0;
|
||||
}
|
||||
|
||||
|
||||
void UTF8(bool utf)
|
||||
{
|
||||
input_as_utf8 = utf;
|
||||
@@ -127,10 +132,17 @@ public:
|
||||
in = in_;
|
||||
post_tab = &post_tab_;
|
||||
var_index = 1;
|
||||
raw_post.clear();
|
||||
|
||||
has_winix_post_params_msg = plugin.HasMessage(WINIX_POST_PARAMS);
|
||||
has_winix_raw_post_msg = plugin.HasMessage(WINIX_RAW_POST_STRING);
|
||||
|
||||
HttpSimpleParser::Parse();
|
||||
|
||||
if( has_winix_raw_post_msg )
|
||||
plugin.Call(0, WINIX_RAW_POST_STRING, &raw_post);
|
||||
|
||||
raw_post.clear();
|
||||
}
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user