else {
const URLEncoder* encoder = XMLToolingConfig::getConfig().getURLEncoder();
string exportName = "Shib-Assertion-00";
- const char* handlerURL=request.getHandlerURL(targetURL.c_str());
- string baseURL = string(handlerURL) + exportLocation.second + "?key=" + session->getID() + "&ID=";
+ string baseURL;
+ if (!strncmp(exportLocation.second, "http", 4))
+ baseURL = exportLocation.second;
+ else
+ baseURL = string(request.getHandlerURL(targetURL.c_str())) + exportLocation.second;
+ baseURL = baseURL + "?key=" + session->getID() + "&ID=";
const vector<const char*>& tokens = session->getAssertionIDs();
vector<const char*>::size_type count = 0;
for (vector<const char*>::const_iterator tokenids = tokens.begin(); tokenids!=tokens.end(); ++tokenids) {
handler = conf.HandlerManager.newPlugin(samlconstants::SAML20_BINDING_URI, make_pair(sessions->getElement(), getId()));
m_handlers.push_back(handler);
- // Insert into location map.
+ // Insert into location map. If it contains the handlerURL, we skip past that part.
+ const char* pch = strstr(location.second, sessions->getString("handlerURL").second);
+ if (pch)
+ location.second = pch + strlen(sessions->getString("handlerURL").second);
if (*location.second == '/')
m_handlerMap[location.second]=handler;
else