added: generating Content-Length header when text answer is sent to the client
added: now we are able to use the html filter for the whole out_streams (when ajax is used the output is filtered too) splitted FilterCompressSend() function -- first we are making the filtering (after filtering we know the size of the content to send) added: to Compress: Compressing(const char * source, size_t source_len, BinaryPage & out_stream, int encoding); changed: some refactoring in App git-svn-id: svn://ttmath.org/publicrep/winix/trunk@942 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -139,7 +139,6 @@ struct Request
|
||||
FunctionBase * function;
|
||||
|
||||
// parameters (name:value)
|
||||
// !! CHECK ME may it should be changed to PT::Space?
|
||||
ParamTab param_tab;
|
||||
|
||||
// this is a pointer either to the item (if exists) or to the last directory
|
||||
@@ -163,12 +162,10 @@ struct Request
|
||||
// !! CHANGE ME it'll be better to use ordinary http result codes
|
||||
Error status;
|
||||
|
||||
|
||||
// if not empty means an address for redirecting to
|
||||
// it should be url-encoded
|
||||
std::wstring redirect_to;
|
||||
|
||||
|
||||
// a redirect type
|
||||
// following redirect types are supported:
|
||||
// 300 Multiple Choices
|
||||
@@ -197,22 +194,24 @@ struct Request
|
||||
// default: false
|
||||
//
|
||||
//
|
||||
//
|
||||
// winix answer send to the client's browser
|
||||
// |
|
||||
// |
|
||||
// depending on send_bin_stream
|
||||
// -------------------------------------------------
|
||||
// (if false) ------------------------------------------------- (if true)
|
||||
// | |
|
||||
// text answer binary answer
|
||||
// | |
|
||||
// depending on return_json sending out_bin_stream
|
||||
// ------------------------------------
|
||||
// (if false) ------------------------------------ (if true)
|
||||
// | |
|
||||
// normal request ajax request
|
||||
// | |
|
||||
// sending out_streams[0] depending on return_info_only
|
||||
// ------------------------------------------------------
|
||||
// sending out_streams[0] |
|
||||
// |
|
||||
// |
|
||||
// depending on return_info_only
|
||||
// (if false) ------------------------------------------------------ (if true)
|
||||
// | |
|
||||
// generating JSON object from: generating JSON object only from info
|
||||
// out_streams and info, e.g.: e.g.:
|
||||
@@ -227,24 +226,9 @@ struct Request
|
||||
//
|
||||
bool send_bin_stream;
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
// binary answer
|
||||
//
|
||||
|
||||
// binary page sent to the client if send_bin_stream is true
|
||||
BinaryPage out_bin_stream;
|
||||
|
||||
//
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
// text answer
|
||||
//
|
||||
|
||||
// when returning the text answer we can either return the whole html page (normal requests)
|
||||
// or a JSON object (for requests generated from AJAX)
|
||||
// if return_json is false then we return the whole html page (which is in out_streams[0])
|
||||
@@ -277,19 +261,21 @@ struct Request
|
||||
// default: null (json_generic_serializer used)
|
||||
PT::SpaceToJSON * info_serializer;
|
||||
|
||||
//
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// if set to true then the standard template system will not be generated
|
||||
|
||||
// if set to true then the standard template system will not be used
|
||||
// default: false
|
||||
bool page_generated;
|
||||
|
||||
// whether or not the html filter should be used
|
||||
// default: true
|
||||
bool use_html_filter;
|
||||
// the size of the table is the same as out_streams
|
||||
// default: all items true
|
||||
std::vector<bool> use_html_filter;
|
||||
|
||||
|
||||
|
||||
|
||||
// if this variable is true then winix always return 200 OK header
|
||||
// when the status would be 404 (not found) or 403 (permission denied)
|
||||
// default: false
|
||||
|
Reference in New Issue
Block a user