Now we allow a request to be passed into a job queue,
and after the job finishes the request is passed into
a controller again. In order to achieve this we have
a requests queue in System, when we put a request
to the job this Request structure is preserved in the
queue and for a new request a new Request is added to
the queue.
while here:
- remove App::Lock()/Unlock(), use scoped locking
- fix: Plugin now has a Call method which takes ModelConnector
and a logger (used in multithreaded environment)
- BaseThread has a main_model_connector pointer
to the main (from the main thread) model connector
- the FastCGI structure fcgi_request moved from App to Request
- some methods for handling requests moved from App to Request
- small refactoring in main.cpp
- add Http class (a http client)
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.
In PostParser we add some prefix with a number if the name of a variable is the same,
we should use zero padding for the number to be correctly sorted.
add config options:
db_startup_connection_max_attempts - default 0 (infinite)
db_startup_connection_attempt_delay - delay in seconds between attempts (default 5)
BREAKING CHANGE: WINIX_PLUGIN_INIT plugin message requires to set result status,
you have to set the result status to true (env.res) if your
plugin was initialized correctly, otherwise winix will not start
Added methods:
void AddParam(const std::wstring & param_name, const std::wstring & param_value);
void AddParam(const wchar_t * param_name, const wchar_t * param_value);
void RemoveParam(const wchar_t * param_name);
void RemoveParam(const std::wstring & param_name);
This is only temporarily, we will be using the pt::Space structure in the future.
Environment variables must be prefixed with winix_ to be loaded by winix.
The winix_ prefix is then removed and the key value converted to lowercase.
Sample:
evn WINIX_MY_OPTION=TEST123test winix -c config_file
This will add my_option to the config with value TEST123test.
Environment variables are read last so they will overwrite the values
from the configuration files.
Usage: winix [options]
-c : a path to the config file
--config : a path to the config file
-h : print usage information
--help : print usage information
-? : print usage information
While here:
- let it be possible to parse multiple configs,
- fix: some error messages were not printed at startup.