Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-9.0.x' into candidate-…
Browse files Browse the repository at this point in the history
…9.2.x

Signed-off-by: Gavin Halliday <[email protected]>

# Conflicts:
#	helm/hpcc/Chart.yaml
#	helm/hpcc/templates/_helpers.tpl
#	helm/hpcc/templates/dafilesrv.yaml
#	helm/hpcc/templates/dali.yaml
#	helm/hpcc/templates/dfuserver.yaml
#	helm/hpcc/templates/eclagent.yaml
#	helm/hpcc/templates/eclccserver.yaml
#	helm/hpcc/templates/eclscheduler.yaml
#	helm/hpcc/templates/esp.yaml
#	helm/hpcc/templates/localroxie.yaml
#	helm/hpcc/templates/roxie.yaml
#	helm/hpcc/templates/sasha.yaml
#	helm/hpcc/templates/thor.yaml
#	version.cmake
  • Loading branch information
ghalliday committed Sep 28, 2023
2 parents a51cbe0 + 92d46db commit 1766a60
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 19 deletions.
52 changes: 34 additions & 18 deletions esp/bindings/http/platform/httpbinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,40 @@ void EspHttpBinding::handleHttpPost(CHttpRequest *request, CHttpResponse *respon
addToESPCache(cacheClient, request, response, cacheID.str(), cacheSeconds);
}

int EspHttpBinding::onGetUnrestricted(CHttpRequest* request, CHttpResponse* response,
const char *serviceName, const char *methodName, sub_service sstype)
{
IEspContext& context = *request->queryContext();
LogLevel level = getEspLogLevel(&context);
if (level >= LogNormal)
DBGLOG("EspHttpBinding::onGetUnrestricted");

response->setVersion(HTTP_VERSION);
response->addHeader("Expires", "0");
response->setStatus(HTTP_STATUS_OK);

// adjust version if necessary
if (m_defaultSvcVersion.get() && !context.queryRequestParameters()->queryProp("ver_"))
context.setClientVersion(atof(m_defaultSvcVersion));

switch (sstype)
{
case sub_serv_xsd:
return onGetXsd(context, request, response, serviceName, methodName);
case sub_serv_wsdl:
return onGetWsdl(context, request, response, serviceName, methodName);
case sub_serv_reqsamplexml:
return onGetReqSampleXml(context, request, response, serviceName, methodName);
case sub_serv_respsamplexml:
return onGetRespSampleXml(context, request, response, serviceName, methodName);
case sub_serv_respsamplejson:
return onGetRespSampleJson(context, request, response, serviceName, methodName);
case sub_serv_reqsamplejson:
return onGetReqSampleJson(context, request, response, serviceName, methodName);
}
return 0;
}

int EspHttpBinding::onGet(CHttpRequest* request, CHttpResponse* response)
{
IEspContext& context = *request->queryContext();
Expand Down Expand Up @@ -1169,13 +1203,7 @@ int EspHttpBinding::onGet(CHttpRequest* request, CHttpResponse* response)
case sub_serv_main:
case sub_serv_index:
case sub_serv_xform:
case sub_serv_xsd:
case sub_serv_wsdl:
case sub_serv_soap_builder:
case sub_serv_reqsamplexml:
case sub_serv_respsamplexml:
case sub_serv_respsamplejson:
case sub_serv_reqsamplejson:
context.setClientVersion(atof(m_defaultSvcVersion));

default:
Expand Down Expand Up @@ -1211,24 +1239,12 @@ int EspHttpBinding::onGet(CHttpRequest* request, CHttpResponse* response)
return onGetXForm(context, request, response, serviceName.str(), methodName.str());
case sub_serv_result:
return onGetResult(context, request, response, serviceName.str(), methodName.str(), pathEx.str());
case sub_serv_wsdl:
return onGetWsdl(context, request, response, serviceName.str(), methodName.str());
case sub_serv_xsd:
return onGetXsd(context, request, response, serviceName.str(), methodName.str());
case sub_serv_instant_query:
return onGetInstantQuery(context, request, response, serviceName.str(), methodName.str());
case sub_serv_soap_builder:
return onGetSoapBuilder(context, request, response, serviceName.str(), methodName.str());
case sub_serv_json_builder:
return onGetJsonBuilder(context, request, response, serviceName.str(), methodName.str());
case sub_serv_reqsamplexml:
return onGetReqSampleXml(context, request, response, serviceName.str(), methodName.str());
case sub_serv_respsamplexml:
return onGetRespSampleXml(context, request, response, serviceName.str(), methodName.str());
case sub_serv_respsamplejson:
return onGetRespSampleJson(context, request, response, serviceName.str(), methodName.str());
case sub_serv_reqsamplejson:
return onGetReqSampleJson(context, request, response, serviceName.str(), methodName.str());
case sub_serv_query:
return onGetQuery(context, request, response, serviceName.str(), methodName.str());
case sub_serv_file_upload:
Expand Down
2 changes: 2 additions & 0 deletions esp/bindings/http/platform/httpbinding.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ interface IEspHttpBinding
virtual int onGetSoapBuilder(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method)=0;
virtual int onGetJsonBuilder(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method)=0;
virtual int onGetReqSampleXml(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method)=0;
virtual int onGetUnrestricted(CHttpRequest* request, CHttpResponse* response, const char *serviceName, const char *methodName, sub_service sstype)=0;
virtual int onGetRespSampleXml(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method)=0;
virtual int onGetRespSampleJson(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method)=0;
virtual int onGetReqSampleJson(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method)=0;
Expand Down Expand Up @@ -325,6 +326,7 @@ class esp_http_decl EspHttpBinding :
return onGet(request, response);
}

virtual int onGetUnrestricted(CHttpRequest* request, CHttpResponse* response, const char *serviceName, const char *methodName, sub_service sstype);
virtual int onGetReqSampleXml(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method);
virtual int onGetRespSampleXml(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method);
virtual int onGetRespSampleJson(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method);
Expand Down
7 changes: 7 additions & 0 deletions esp/bindings/http/platform/httpservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,13 @@ int CEspHttpServer::processRequest()

if (thebinding!=NULL)
{
if (thebinding->isUnrestrictedSSType(stype))
{
thebinding->onGetUnrestricted(m_request.get(), m_response.get(), serviceName.str(), methodName.str(), stype);
ctx->addTraceSummaryTimeStamp(LogMin, "handleHttp");
return 0;
}

if(stricmp(method.str(), POST_METHOD)==0)
thebinding->handleHttpPost(m_request.get(), m_response.get());
else if(!stricmp(method.str(), GET_METHOD))
Expand Down
2 changes: 1 addition & 1 deletion esp/smc/SMCLib/TpWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ void CTpWrapper::getGroupList(double espVersion, const char* kindReq, IArrayOf<I
{
IPropertyTree &group = groups->query();
const char* kind = group.queryProp("@kind");
if (kindReq && *kindReq && !strieq(kindReq, kind))
if (!isEmptyString(kindReq) && !strisame(kindReq, kind))
continue;

IEspTpGroup* pGroup = createTpGroup("","");
Expand Down

0 comments on commit 1766a60

Please sign in to comment.