[cpp-sp COMMIT] /branches/REL_2/shibsp/handler/impl/AbstractHandler.cpp
noreply at shibboleth.net
noreply at shibboleth.net
Thu Feb 2 05:24:02 GMT 2012
Author: scantor
Date: Thu Feb 2 05:24:02 2012
New Revision: 3569
URL: http://svn.shibboleth.net/view/cpp-sp?rev=3569&view=rev
Log:
Remove old absolutize method
Modified:
branches/REL_2/shibsp/handler/impl/AbstractHandler.cpp
Modified: branches/REL_2/shibsp/handler/impl/AbstractHandler.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/handler/impl/AbstractHandler.cpp?rev=3569&r1=3568&r2=3569&view=diff
==============================================================================
--- branches/REL_2/shibsp/handler/impl/AbstractHandler.cpp (original)
+++ branches/REL_2/shibsp/handler/impl/AbstractHandler.cpp Thu Feb 2 05:24:02 2012
@@ -86,21 +86,6 @@
SHIBSP_DLLLOCAL PluginManager< Handler,string,pair<const DOMElement*,const char*> >::Factory MetadataGeneratorFactory;
SHIBSP_DLLLOCAL PluginManager< Handler,string,pair<const DOMElement*,const char*> >::Factory StatusHandlerFactory;
SHIBSP_DLLLOCAL PluginManager< Handler,string,pair<const DOMElement*,const char*> >::Factory SessionHandlerFactory;
-
- void SHIBSP_DLLLOCAL absolutize(const HTTPRequest& request, string& url) {
- if (url.empty())
- url = '/';
- if (url[0] == '/') {
- // Compute a URL to the root of the site.
- int port = request.getPort();
- const char* scheme = request.getScheme();
- string root = string(scheme) + "://" + request.getHostname();
- if ((!strcmp(scheme, "http") && port != 80) || (!strcmp(scheme, "https") && port != 443)) {
- root += ":" + lexical_cast<string>(port);
- }
- url = root + url;
- }
- }
void SHIBSP_DLLLOCAL generateRandomHex(std::string& buf, unsigned int len) {
static char DIGITS[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
@@ -342,13 +327,13 @@
if (storage->readString("RelayState",ssid.c_str(),&relayState) > 0) {
if (clear)
storage->deleteString("RelayState",ssid.c_str());
- absolutize(request, relayState);
+ request.absolutize(relayState);
return;
}
else if (storage->readText("RelayState",ssid.c_str(),&relayState) > 0) {
if (clear)
storage->deleteText("RelayState",ssid.c_str());
- absolutize(request, relayState);
+ request.absolutize(relayState);
return;
}
else {
@@ -376,7 +361,7 @@
}
else {
relayState = out.string();
- absolutize(request, relayState);
+ request.absolutize(relayState);
return;
}
}
@@ -404,7 +389,7 @@
exp += "; expires=Mon, 01 Jan 2001 00:00:00 GMT";
response.setCookie(relay_cookie.first.c_str(), exp.c_str());
}
- absolutize(request, relayState);
+ request.absolutize(relayState);
return;
}
}
@@ -421,7 +406,7 @@
relayState = '/';
}
- absolutize(request, relayState);
+ request.absolutize(relayState);
}
AbstractHandler::AbstractHandler(
More information about the commits
mailing list