// they are not null -- when the server doesn't have such a variable it will be pointing into 'char_empty' which is default '\0'
// they are not null -- when the server doesn't have such a variable
// it will be pointing into 'char_empty' which is default '\0'
constchar*env_request_method;
constchar*env_request_uri;
constchar*env_http_cookie;
@ -68,22 +69,7 @@ struct Request
// is set after calling session_manager.SetSession()
Session*session;
// 'done_status' is set if 'done' is different than 'nothing'
Errordone_status;// !! wywalic - jest przeciez w session
// what to do
// !! wywalic?
enumResult{err_internal,err404,err_per_denied,show_dir,show_item,show_item_by_id,add_item,edit_item,del_item,del_item_confirm,confirm,redirect,logout}result;// zamienic na to_do
// !! nowe skladowe
// current directory
// !! zapewnic aby byl minimum jeden katalog (root)
// !! moze nazwac to poprostu dir?
std::vector<Item*>dir_table;
boolis_item;
@ -102,33 +88,17 @@ struct Request
// last notify
intnotify_code;
// ------------------
// !! stare skladowe
// current directory e.g. /foo/bar
//std::vector<Item> cur_dir_table;
// id of the last directory (bar) or -1
//long dir;
// ------------------
// items in the current directory
// maybe without contents?
std::vector<Item>item_table;
// directories in the current directory
//std::vector<Item> dir_table2;
// current thread (if exists)
boolis_thread;
Threadthread;
std::vector<Thread>thread_tab;
// this string is used for many purposes such as redirecting
std::stringstr;
// if not empty means an address for redirecting to
std::stringredirect_to;
// for debugging
voidPrintGetTable();
@ -146,12 +116,8 @@ struct Request
voidSetCookie(constchar*name,longvalue);
boolIsPostVar(constchar*var);
std::string&PostVar(constchar*var);// with a throw !!! wywalic te wyjatki ztad, niech zwraca pusty string jak nie znajdzie nic, albo referencje na jakis statyczny pusty string
//bool PostVar(const char * var, std::string & result);
// item_table[0] -> item
// !! to tez nie bedzie potrzebne
voidCopyFirstItem();
std::string*PostVar(constchar*var);// it can return null when there is no such a post variable
boolPostVar(constchar*var,std::string&result);
voidReadEnvVariables();
@ -187,8 +153,6 @@ private:
// it contains '\0'
constcharchar_empty;
// used when returning a reference to std::string (when the string doesn't exist)