Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ private ITapisClient loadClient(String key)

case TapisConstants.SERVICE_NAME_META: {
client = new MetaClient(router.getServiceBaseUrl(), router.getAccessJWT());
client.addDefaultHeader("Content-Type", "application/json");
break;
}

Expand All @@ -344,11 +345,15 @@ private ITapisClient loadClient(String key)
if (client == null)
throw new TapisException(MsgUtils.getMsg("TAPIS_CLIENT_NOT_FOUND", service, tenant, user));

// Assign required headers.
// Assign headers required by all clients.
client.addDefaultHeader("X-Tapis-User", user);
client.addDefaultHeader("X-Tapis-Tenant", tenant);
client.addDefaultHeader("Content-Type", "application/json");

// NOTE that we do not add Content-Type header for globus-proxy client. Client is only used for GET.
// Including it can cause the globus-proxy service to return a 400. Header not needed for GET.
if (!TapisConstants.SERVICE_NAME_GLOBUSPROXY.equals(service)) {
client.addDefaultHeader("Content-Type", "application/json");
}

// Return the client.
return client;
}
Expand Down