apucher commented on a change in pull request #6552:
URL: https://github.com/apache/incubator-pinot/pull/6552#discussion_r572542570
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java
##########
@@ -210,7 +214,14 @@ public String getQueryResponse(String query, String
traceEnabled, String queryOp
String url = getQueryURL(protocol,
hostNameWithPrefix.substring(hostNameWithPrefix.indexOf("_") + 1),
String.valueOf(port), querySyntax);
ObjectNode requestJson = getRequestJson(query, traceEnabled, queryOptions,
querySyntax);
- return sendRequestRaw(url, query, requestJson);
+
+ // forward client-supplied headers
+ Map<String, String> headers =
httpHeaders.getRequestHeaders().entrySet().stream()
+ .filter(entry -> !entry.getValue().isEmpty())
+ .map(entry -> Pair.of(entry.getKey(), entry.getValue().get(0)))
Review comment:
For our purposes, yes. Pinot's handling of http headers overall isn't
too glorious.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]