Skip to content

Commit

Permalink
Changes following review
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Sep 27, 2023
1 parent c3b78cc commit a026ccd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions esp/services/ws_ecl/ws_ecl_service.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ class CWsEclService : public CInterface,

StringBuffer &getHttpGlobalIdHeader(CHttpRequest *request, StringBuffer &value)
{
if (!getHttpIdHeader(request, "Global-Id", value))
getHttpIdHeader(request, "HPCC-Global-Id", value);
if (!getHttpIdHeader(request, kGlobalIdHttpHeaderName, value))
getHttpIdHeader(request, kLegacyGlobalIdHttpHeaderName, value);
return value;
}
StringBuffer &getHttpCallerIdHeader(CHttpRequest *request, StringBuffer &value)
{
if (!getHttpIdHeader(request, "Caller-Id", value))
getHttpIdHeader(request, "HPCC-Caller-Id", value);
if (!getHttpIdHeader(request, kCallerIdHttpHeaderName, value))
getHttpIdHeader(request, kLegacyCallerIdHttpHeaderName, value);
return value;
}

Expand Down
8 changes: 4 additions & 4 deletions roxie/ccd/ccdprotocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1689,17 +1689,17 @@ class RoxieSocketWorker : public ProtocolQueryWorker

const char *queryRequestGlobalIdHeader(HttpHelper &httpHelper, IContextLogger &logctx)
{
const char *id = httpHelper.queryRequestHeader("Global-Id");
const char *id = httpHelper.queryRequestHeader(kGlobalIdHttpHeaderName);
if (!id || !*id)
id = httpHelper.queryRequestHeader("HPCC-Global-Id"); // Backward compatibility - passed on as global-id
id = httpHelper.queryRequestHeader(kLegacyGlobalIdHttpHeaderName); // Backward compatibility - passed on as global-id
return id;
}

const char *queryRequestCallerIdHeader(HttpHelper &httpHelper, IContextLogger &logctxheaderused)
{
const char *id = httpHelper.queryRequestHeader("Caller-Id");
const char *id = httpHelper.queryRequestHeader(kCallerIdHttpHeaderName);
if (!id || !*id)
id = httpHelper.queryRequestHeader("HPCC-Caller-Id"); // Backward compatibility - passed on as caller-id
id = httpHelper.queryRequestHeader(kLegacyCallerIdHttpHeaderName); // Backward compatibility - passed on as caller-id
return id;
}

Expand Down
8 changes: 4 additions & 4 deletions system/jlib/jtrace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
* Known HPCC span Keys could be added here
* Specialized span keys can also be defined within the scope of a span
*/
static constexpr const char *kGlobalIdHttpHeaderName = "global-id";
static constexpr const char *kCallerIdHttpHeaderName = "caller-id";
static constexpr const char *kLegacyGlobalIdHttpHeaderName = "hpcc-global-id";
static constexpr const char *kLegacyCallerIdHttpHeaderName = "hpcc-caller-id";
static constexpr const char *kGlobalIdHttpHeaderName = "Global-Id";
static constexpr const char *kCallerIdHttpHeaderName = "Caller-Id";
static constexpr const char *kLegacyGlobalIdHttpHeaderName = "HPCC-Global-Id";
static constexpr const char *kLegacyCallerIdHttpHeaderName = "HPCC-Caller-Id";

class jlib_decl LogTrace
{
Expand Down

0 comments on commit a026ccd

Please sign in to comment.