char* g_szSHIBConfig = NULL;
char* g_szSchemaDir = NULL;
ShibTargetConfig* g_Config = NULL;
+ string g_unsetHeaderValue;
static const char* g_UserDataKey = "_shib_check_user_";
}
}
virtual void clearHeader(const string &name) {
ap_table_unset(m_req->headers_in, name.c_str());
+ ap_table_set(m_req->headers_in, name.c_str(), g_unsetHeaderValue.c_str());
}
virtual void setHeader(const string &name, const string &value) {
ap_table_set(m_req->headers_in, name.c_str(), value.c_str());
ap_log_error(APLOG_MARK,APLOG_CRIT|APLOG_NOERRNO,SH_AP_R(s),"shib_child_init() failed to load configuration");
exit(1);
}
+
+ IConfig* conf=g_Config->getINI();
+ Locker locker(conf);
+ const IPropertySet* props=conf->getPropertySet("Local");
+ if (props) {
+ pair<bool,const char*> unsetValue=props->getString("unsetHeaderValue");
+ if (unsetValue.first)
+ g_unsetHeaderValue = unsetValue.second;
+ }
}
catch (...) {
ap_log_error(APLOG_MARK,APLOG_CRIT|APLOG_NOERRNO,SH_AP_R(s),"shib_child_init() failed to initialize system");
NULL /* post read-request */
};
-#elif defined(SHIB_APACHE_20)
+#elif defined(SHIB_APACHE_20) || defined(SHIB_APACHE_22)
extern "C" void shib_register_hooks (apr_pool_t *p)
{