added: cmslu can act as an authorizer (fast cgi authorize role) added: Item::static_auth we can have additional static content on the file system this content is authorized through cmslu (fastcgi authorizer mode) changed: some changes in config changed: the way how the www server is using cmslu added new virtuals: static static_auth changed: cmslu returns correct http headers (200, 404, 403) changed: in cookie parser: we get the last cookie (if the server has more than one cookie with the same name) git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@540 e52654a7-88a9-db11-a3e9-0013d4bc506e
44 lines
821 B
C++
Executable File
44 lines
821 B
C++
Executable File
/*
|
|
* This file is a part of CMSLU -- Content Management System like Unix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2008-2009, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#include "data.h"
|
|
|
|
|
|
|
|
|
|
|
|
Data::Data()
|
|
{
|
|
signal_hup = false;
|
|
stdout_is_closed = false;
|
|
|
|
// the rest will be read from a config file
|
|
}
|
|
|
|
|
|
|
|
void Data::SetAdditionalVariables()
|
|
{
|
|
SetHttpHost(base_url, base_url_http_host);
|
|
SetHttpHost(base_url_static_auth, base_url_static_auth_http_host);
|
|
}
|
|
|
|
|
|
|
|
void Data::SetHttpHost(const std::string & in, std::string & out)
|
|
{
|
|
if( strncmp(in.c_str(), "http://", 7) == 0 )
|
|
out = in.substr(7);
|
|
else
|
|
if( strncmp(in.c_str(), "https://", 8) == 0 )
|
|
out = in.substr(8);
|
|
else
|
|
out.clear(); // if empty the RequestController::BaseUrlRedirect() returns false and no redirecting will be done
|
|
}
|