added: config: base_url_redirect
when true the server checks whether HTTP_HOST environment variable is the same as base_url from the config (of course without the 'http://' part and the last slash) - if it's not the same then the server redirects you into a new location base_url+REQUEST_URI changed: variables env_* from Request are never null (after Request::Read()) if the server didn't set such a variable it will be pointing into an empty string "\0" git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@465 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -41,11 +41,13 @@ struct Request
|
||||
PostTable post_table;
|
||||
CookieTable cookie_table;
|
||||
|
||||
// environment variables (can be null)
|
||||
// environment variables
|
||||
// they are not null -- when the server doesn't have such a variable it will be pointing into 'char_empty' which is default '\0'
|
||||
const char * env_request_method;
|
||||
const char * env_request_uri;
|
||||
const char * env_http_cookie;
|
||||
const char * env_remote_addr;
|
||||
const char * env_http_host;
|
||||
|
||||
// current session
|
||||
// is set after calling session_manager.SetSession()
|
||||
@@ -107,6 +109,12 @@ struct Request
|
||||
void SendAll();
|
||||
|
||||
|
||||
private:
|
||||
// used to set some env_* variables into it, when the server didn't set that variable
|
||||
// it contains '\0'
|
||||
const char char_empty;
|
||||
|
||||
const char * SetEnvVar(const char * var);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user