/*\r
- * Copyright 2001-2007 Internet2\r
+ * Copyright 2001-2009 Internet2\r
*\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
return s ? s : "";\r
}\r
string getRemoteAddr() const {\r
+ string ret = AbstractSPRequest::getRemoteAddr();\r
+ if (!ret.empty())\r
+ return ret;\r
const char* s = FCGX_GetParam("REMOTE_ADDR", m_req->envp);\r
return s ? s : "";\r
}\r
}\r
\r
void setResponseHeader(const char* name, const char* value) {\r
+ AbstractSPRequest::setResponseHeader(name, value);\r
// Set for later.\r
if (value)\r
m_headers.insert(make_pair(name,value));\r
}\r
\r
long sendRedirect(const char* url) {\r
+ AbstractSPRequest::sendRedirect(url);\r
string hdr=string("Status: 302 Please Wait\r\nLocation: ") + url + "\r\n"\r
"Content-Type: text/html\r\n"\r
"Content-Length: 40\r\n"\r
\r
try {\r
if (!g_Config->instantiate(NULL, true))\r
- throw exception("unknown error");\r
+ throw runtime_error("unknown error");\r
}\r
catch (exception& ex) {\r
g_Config->term();\r
\r
pair<bool,long> res = stf.getServiceProvider().doHandler(stf);\r
if (res.first) {\r
-#ifdef _DEBUG\r
- cerr << "shib: doHandler handled the request" << endl;\r
-#endif\r
+ stf.log(SPRequest::SPDebug, "shib: doHandler handled the request");\r
switch(res.second) {\r
case SHIB_RETURN_OK:\r
print_ok();\r