add a Request::raw_post buffer

This buffer is used when a Function::NeedToCopyRawPost() method returned true.

while here:
- remove WINIX_POST_PARAMS and WINIX_RAW_POST_STRING plugin messages
This commit is contained in:
2023-11-02 05:14:48 +01:00
parent a08bf9f804
commit 79babc916a
11 changed files with 57 additions and 71 deletions

View File

@@ -4,8 +4,8 @@
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2021, Tomasz Sowa
/*
* Copyright (c) 2008-2023, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -558,6 +558,9 @@ void PostMultiParser::ReadChar()
in_buffer_len = FCGX_GetStr((char*)in_buffer, WINIX_POSTMULTI_INPUT_BUFFER, in);
in_buffer_ind = 0;
if( copy_raw_post && in_buffer_len > 0 )
request->raw_post.write((char *)in_buffer, in_buffer_len);
}
if( in_buffer_len == 0 )
@@ -574,7 +577,7 @@ void PostMultiParser::ReadChar()
Error PostMultiParser::Parse(FCGX_Stream * in_, Request & request)
Error PostMultiParser::Parse(FCGX_Stream * in_, Request & request, bool copy_raw_post)
{
in = in_;
last = 0;
@@ -584,6 +587,7 @@ Error PostMultiParser::Parse(FCGX_Stream * in_, Request & request)
in_buffer_ind = WINIX_POSTMULTI_INPUT_BUFFER;
in_buffer_len = WINIX_POSTMULTI_INPUT_BUFFER;
this->request = &request;
this->copy_raw_post = copy_raw_post;
tmp_filename_postfix = 1;
ReadChar();