You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/02/09 03:21:24 UTC

[GitHub] [incubator-pinot] apucher commented on a change in pull request #6552: add optional http basic auth to pinot broker

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org