|
@@ -234,10 +234,10 @@ bool CWsEclService::init(const char * name, const char * type, IPropertyTree * c
|
|
|
workunitTimeout = WAIT_FOREVER;
|
|
|
|
|
|
const char *headerName = serviceTree->queryProp("HttpGlobalIdHeader");
|
|
|
- if (headerName && *headerName && !streq(headerName, "HPCC-Global-Id")) //default will be checked anyway
|
|
|
+ if (headerName && *headerName && !streq(headerName, "Global-Id") && !streq(headerName, "HPCC-Global-Id")) //defaults will be checked anyway
|
|
|
globalIdHttpHeader.set(headerName);
|
|
|
headerName = serviceTree->queryProp("HttpCallerIdHeader");
|
|
|
- if (headerName && *headerName && !streq(headerName, "HPCC-Caller-Id")) //default will be checked anyway
|
|
|
+ if (headerName && *headerName && !streq(headerName, "Caller-Id") && !streq(headerName, "HPCC-Caller-Id")) //defaults will be checked anyway
|
|
|
callerIdHttpHeader.set(headerName);
|
|
|
|
|
|
Owned<IPropertyTreeIterator> cfgTargets = serviceTree->getElements("Targets/Target");
|
|
@@ -1891,16 +1891,19 @@ int CWsEclBinding::submitWsEclWorkunit(IEspContext & context, WsEclWuInfo &wsinf
|
|
|
if (httpreq)
|
|
|
{
|
|
|
StringBuffer globalId, callerId;
|
|
|
- wsecl->getHttpGlobalIdHeader(httpreq, globalId);
|
|
|
- wsecl->getHttpCallerIdHeader(httpreq, callerId);
|
|
|
+ StringAttr globalIdHeader, callerIdHeader;
|
|
|
+ wsecl->getHttpGlobalIdHeader(httpreq, globalId, globalIdHeader);
|
|
|
+ wsecl->getHttpCallerIdHeader(httpreq, callerId, callerIdHeader);
|
|
|
if (globalId.length())
|
|
|
{
|
|
|
workunit->setDebugValue("GlobalId", globalId.str(), true);
|
|
|
+ workunit->setDebugValue("GlobalIdHeader", globalIdHeader.str(), true); //use same header received
|
|
|
|
|
|
SocketEndpoint ep;
|
|
|
StringBuffer localId;
|
|
|
appendLocalId(localId, httpreq->getSocket()->getEndpoint(ep), 0);
|
|
|
workunit->setDebugValue("CallerId", localId.str(), true); //our localId becomes caller id for the next hop
|
|
|
+ workunit->setDebugValue("CallerIdHeader", callerIdHeader.str(), true); //use same header received
|
|
|
DBGLOG("GlobalId: %s, CallerId: %s, LocalId: %s, Wuid: %s", globalId.str(), callerId.str(), localId.str(), wuid.str());
|
|
|
}
|
|
|
}
|
|
@@ -1986,23 +1989,24 @@ void CWsEclBinding::sendRoxieRequest(const char *target, StringBuffer &req, Stri
|
|
|
if (httpreq)
|
|
|
{
|
|
|
StringBuffer globalId, callerId;
|
|
|
- wsecl->getHttpGlobalIdHeader(httpreq, globalId);
|
|
|
- wsecl->getHttpCallerIdHeader(httpreq, callerId);
|
|
|
+ StringAttr globalIdHeader, callerIdHeader;
|
|
|
+ wsecl->getHttpGlobalIdHeader(httpreq, globalId, globalIdHeader);
|
|
|
+ wsecl->getHttpCallerIdHeader(httpreq, callerId, callerIdHeader);
|
|
|
|
|
|
if (globalId.length())
|
|
|
{
|
|
|
headers.setown(createProperties());
|
|
|
- headers->setProp(wsecl->queryGlobalIdHeaderName(), globalId);
|
|
|
+ headers->setProp(globalIdHeader, globalId);
|
|
|
|
|
|
SocketEndpoint ep;
|
|
|
StringBuffer localId;
|
|
|
appendLocalId(localId, httpreq->getSocket()->getEndpoint(ep), 0);
|
|
|
if (localId.length())
|
|
|
- headers->setProp(wsecl->queryCallerIdHeaderName(), localId);
|
|
|
+ headers->setProp(callerIdHeader, localId);
|
|
|
DBGLOG("GlobalId: %s, CallerId: %s, LocalId: %s", globalId.str(), callerId.str(), localId.str());
|
|
|
}
|
|
|
}
|
|
|
- if (0 > httpclient->sendRequest("POST", contentType, req, resp, status))
|
|
|
+ if (0 > httpclient->sendRequest(headers, "POST", contentType, req, resp, status))
|
|
|
throw MakeStringException(-1, "Roxie cluster communication error: %s", target);
|
|
|
}
|
|
|
catch (IException *e)
|