remove Request::post_tab and add Request::http_status
Instead of Reqest::post_tab we use now Request::post_in (pt::Space). Request::http_status will be used instead Request::status, but at the moment is not changed in all places. Request::status has been marked as depracated. While here: - Check for root dir in App and not in FunctionParser, let FunctionParser only log the root dir. - Read post variables after parsing url parameters, this allows winix functions to set limits for post input. - Set limits when parsing input json format, new options added to config: post_max_object_items, post_max_table_items, post_max_all_items, post_max_nested_objects. There are similar options in each winix function (they are in FunctionBase). - Some refactoring in App. - Add config option: log_whole_http_post if true then the whole parsed post input is logged. - Add config option: post_json_max - max length of input stream for parsing json. - Add config option: templates_request_status, default request_status.html this is an ezc template used as [content] when the request status is not 200_ok. - Fix: Sort winix function didn't show items to sort (fix and do some refactoring as well) - Properly sort items in: ImgCrop, Ls, Sort, Upload - Remove ezc templates: err_404.html, err_per_denied.html - now request_status.html is used.
This commit is contained in:
@@ -84,7 +84,8 @@ public:
|
||||
// the log level (how much info should be inserted to logs)
|
||||
// 1 - minimum
|
||||
// 2 - (default)
|
||||
// 3 - maximum - all logs
|
||||
// 3 - more logs
|
||||
// 4 - maximum - all logs
|
||||
int log_level;
|
||||
|
||||
// logging to stdout too
|
||||
@@ -130,11 +131,17 @@ public:
|
||||
std::wstring log_delimiter;
|
||||
|
||||
// log environment variables (fastcgi environment)
|
||||
// default: false;
|
||||
bool log_env_variables;
|
||||
|
||||
// log environment http variables (only HTTP_* variables from fastcgi environment)
|
||||
// default: false;
|
||||
bool log_env_http_variables;
|
||||
|
||||
// log the whole http post structure (in json format) after parsing the post input
|
||||
// default: false;
|
||||
bool log_whole_http_post;
|
||||
|
||||
// log headers (+cookies) which are returned to the client
|
||||
// this is what winix has generated -- the web server can change or add other headers
|
||||
// default: false
|
||||
@@ -198,6 +205,10 @@ public:
|
||||
// default: index_raw.html
|
||||
std::wstring templates_index_raw;
|
||||
|
||||
// html template used to show a http status such as Forbidden or Not Found
|
||||
// default: request_status.html
|
||||
std::wstring templates_request_status;
|
||||
|
||||
// if true then only root can use 'template' winix function
|
||||
// default: false
|
||||
bool template_only_root_use_template_fun;
|
||||
@@ -404,6 +415,35 @@ public:
|
||||
// 0 - not used
|
||||
size_t post_file_max;
|
||||
|
||||
// maximum length of the input stream when parsing it as json
|
||||
// default: 8388608 - 8MB
|
||||
// set zero to disable checking
|
||||
size_t post_json_max;
|
||||
|
||||
// maximum key/value pairs in one object when parsing post json structure
|
||||
// default: 1024
|
||||
// set zero to disable checking
|
||||
// each winix function can set its own limits
|
||||
size_t post_max_object_items;
|
||||
|
||||
// maximum items in one table when parsing post json structure
|
||||
// default: 4096
|
||||
// set zero to disable checking
|
||||
// each winix function can set its own limits
|
||||
size_t post_max_table_items;
|
||||
|
||||
// maximum items (key/values pairs of objects or table items) througout the whole post input json structure
|
||||
// default: 8192
|
||||
// set zero to disable checking
|
||||
// each winix function can set its own limits
|
||||
size_t post_max_all_items;
|
||||
|
||||
// maximum nested objects/tables when parsing post json structure
|
||||
// default: 32
|
||||
// set zero to disable checking
|
||||
// each winix function can set its own limits
|
||||
size_t post_max_nested_objects;
|
||||
|
||||
// directory for static files
|
||||
std::wstring upload_dir;
|
||||
|
||||
|
Reference in New Issue
Block a user