added: functions: ckeditor, uptime

added: for function: login - a html pattern for GET request


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@567 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-02-11 20:56:52 +00:00
parent fc3c303d30
commit adf36e71ce
51 changed files with 1006 additions and 353 deletions

View File

@@ -14,20 +14,20 @@
PostMultiParser::PostMultiParser()
{
in_buffer = new unsigned char[CMSLU_POSTMULTI_INPUT_BUFFER];
in_buffer = new unsigned char[WINIX_POSTMULTI_INPUT_BUFFER];
}
PostMultiParser::PostMultiParser(const PostMultiParser &)
{
in_buffer = new unsigned char[CMSLU_POSTMULTI_INPUT_BUFFER];
in_buffer = new unsigned char[WINIX_POSTMULTI_INPUT_BUFFER];
}
PostMultiParser & PostMultiParser::operator=(const PostMultiParser &)
{
in_buffer = new unsigned char[CMSLU_POSTMULTI_INPUT_BUFFER];
in_buffer = new unsigned char[WINIX_POSTMULTI_INPUT_BUFFER];
return *this;
}
@@ -256,11 +256,11 @@ bool has_boundary = false;
content += last;
ReadChar();
if( content.size() > CMSLU_POSTMULTI_OUTPUT_BUFFER + boundary.size() + 2 ) // +2 for the new line character
if( content.size() > WINIX_POSTMULTI_OUTPUT_BUFFER + boundary.size() + 2 ) // +2 for the new line character
{
tmp_file.write(content.c_str(), CMSLU_POSTMULTI_OUTPUT_BUFFER);
content_len += CMSLU_POSTMULTI_OUTPUT_BUFFER;
content.erase(0, CMSLU_POSTMULTI_OUTPUT_BUFFER);
tmp_file.write(content.c_str(), WINIX_POSTMULTI_OUTPUT_BUFFER);
content_len += WINIX_POSTMULTI_OUTPUT_BUFFER;
content.erase(0, WINIX_POSTMULTI_OUTPUT_BUFFER);
}
if( data.post_file_max != 0 && content_len > (size_t)data.post_file_max )
@@ -290,7 +290,7 @@ void PostMultiParser::ReadContentToFile()
time_t t1, t2;
content.clear();
content.reserve(CMSLU_POSTMULTI_OUTPUT_BUFFER + boundary.size());
content.reserve(WINIX_POSTMULTI_OUTPUT_BUFFER + boundary.size());
content_len = 0;
t1 = time(0);
@@ -343,10 +343,10 @@ void PostMultiParser::ReadContent()
void PostMultiParser::AddNormalPostVar()
{
if( post_table->size() >= CMSLU_POSTTABLE_MAXSIZE )
if( post_table->size() >= WINIX_POSTTABLE_MAXSIZE )
{
err = Error::input_too_large;
log << log1 << "PMP: more than " << CMSLU_POSTTABLE_MAXSIZE << " post variables (skipping)" << logend;
log << log1 << "PMP: more than " << WINIX_POSTTABLE_MAXSIZE << " post variables (skipping)" << logend;
return;
}
@@ -364,10 +364,10 @@ void PostMultiParser::AddNormalPostVar()
void PostMultiParser::AddFilePostVar()
{
if( post_file_table->size() >= CMSLU_POSTTABLE_MAXSIZE )
if( post_file_table->size() >= WINIX_POSTTABLE_MAXSIZE )
{
err = Error::input_too_large;
log << log1 << "PMP: more than " << CMSLU_POSTTABLE_MAXSIZE << " post file variables (skipping)" << logend;
log << log1 << "PMP: more than " << WINIX_POSTTABLE_MAXSIZE << " post file variables (skipping)" << logend;
return;
}
@@ -433,7 +433,7 @@ void PostMultiParser::CreateTmpFile()
{
char buf[100];
sprintf(buf, "/tmp/cmslu_%u_%d_%u", (unsigned)getpid(), tmp_filename_postfix, rand());
sprintf(buf, "/tmp/winix_%u_%d_%u", (unsigned)getpid(), tmp_filename_postfix, rand());
tmp_filename_postfix += 1;
tmp_file.open(buf, std::ios_base::binary | std::ios_base::out);
@@ -493,13 +493,13 @@ void PostMultiParser::ReadChar()
if( in_buffer_ind >= in_buffer_len )
{
if( in_buffer_len < CMSLU_POSTMULTI_INPUT_BUFFER )
if( in_buffer_len < WINIX_POSTMULTI_INPUT_BUFFER )
{
last = -1;
return;
}
in_buffer_len = FCGX_GetStr((char*)in_buffer, CMSLU_POSTMULTI_INPUT_BUFFER, in);
in_buffer_len = FCGX_GetStr((char*)in_buffer, WINIX_POSTMULTI_INPUT_BUFFER, in);
in_buffer_ind = 0;
}
@@ -522,8 +522,8 @@ Error PostMultiParser::Parse(FCGX_Stream * in_, PostTable & post_table_, PostFil
last = 0;
err = Error::ok;
line_end_dos = false;
in_buffer_ind = CMSLU_POSTMULTI_INPUT_BUFFER;
in_buffer_len = CMSLU_POSTMULTI_INPUT_BUFFER;
in_buffer_ind = WINIX_POSTMULTI_INPUT_BUFFER;
in_buffer_len = WINIX_POSTMULTI_INPUT_BUFFER;
post_table = &post_table_;
post_file_table = &post_file_table_;
tmp_filename_postfix = 1;