The session cookie was not created because request->session pointed at
a temporary session.
While here:
- do some cleaning in App
- set request->mount too
- add fcgi_cannot_create_request_delay to the config
- fix: in mailregister plugin get model_connector from env (and not from the request)
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.
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
now winix can return json, xml, csv from out_main_stream or from frames and json from models
removed from Request:
bool send_bin_stream
bool return_json
bool return_info_only
pt::Space info
bool page_generated
bool out_main_stream_use_html_filter
bool out_streams_use_html_filter
added to Request:
enum AnswerSource
enum AnswerContainer
AnswerSource answer_source
AnswerContainer answer_container
bool use_ezc_engine
std::wstring frame
bool send_all_frames
bool use_html_filter
added to Config:
// the name of the url parameter for returning all frames, e.g. https://domain.tld/mydir/myfunction/allframes
// default: allframes
std::wstring request_all_frames_parameter;
// the name of the root element when serializing request answer to xml
// default: winix
std::wstring xml_root;
algorithm (the whole algorithm is described in core/request.h):
at the beginning of a request winix sets
answer_source to models
answer_container to text
use_ezc_engine to true
next answer_container and use_ezc_engine can be changed in the following way:
1. winix will look for 'Accept' http header and depending on the header winix will set:
(not implemented yet)
Accept | answer_container | use_ezc_engine
------------------------------------|-----------------
application/json | json | false
application/xml | xml | false
text/csv | csv | false
2. next answer_container is set depending on 'container' url parameter
container | answer_container
---------------------------------------------------------
not present | don't change the value
text | text
json | json
xml | xml
csv | csv
use_ezc_engine is set depending on 'answer' url parameter:
answer | use_ezc_engine
---------------------------------
not present | don't change the value
html | true
data | false
if 'answer' is html then we take into account two more parameters:
frame: frame_name (empty default) - if set then winix returns this specific frame
allframes: (if present then winix returns all frames)
added: std::wstring file_mime_type to ItemContent - a mime type for static file
added: Header (core/header.h) - there will be header names defined, at the moment only content_type
added: FuncionsBase::Finish() - it is called at the end when the winix finishes
added to config: int html_filter_white_char_mode;
how white characters between html tags are treated
0 - WHITE_MODE_ORIGIN - they are copied from input to output
1 - WHITE_MODE_SINGLE_LINE - new line characters are removed
2 - WHITE_MODE_TREE - try to create a tree (some kind of pretty printing)
default: 2
some plugins need to be fixed yet: ticket, gallery, group, menu
- added current user to default models as "user"
- renamed in User: super_user -> is_super_user, env -> admin_env, pass_hash_salted -> is_pass_hash_salted
- now Users class has a WinixModel as a base class
some plugin calls have to be fixed yet
- added UserWrapper model with a pointer to User class
- removed from ItemContent: methods for accessing 'meta' and 'admin_meta', now ezc can iterate through Space classes
- fixed in env winix function: if there is "changeuser" parameter then we should only switch the user (not save anything)
added: WinixModel (models/winixmodel.h|cpp) - a class inheriting from morm::WinixModel, we have methods such as: get_config(), get_logger(), get_request()
and this class will be a base class for our models
added: WinixModelConnector (models/winixmodelconnector.h|cpp) - a class inheriting from morm::WinixModelConnector
this connector we are using instead of morm::ModelConnector - there are pointers to winix objects there (config, request, log)
added to Request: Ezc::Models models
removed from TemplatesFunctions: Ezc::Models ezc_models;
changed: ImgCrop winix functions is using its own item_tab vector now (not finished yet)
added: Item::is(), Item::link(), ItemContent::print_content()
- commented out using mount_page_arg_is "subject" and "info" from fun_cat.html and fun_run.html - they will be removed soon
- some improvements in fun_reply.html, fun_showthreads.html and fun_thread.html (scrolling)