jaihind213 commented on a change in pull request #4033: Query Response format
to be based on http 'accept' header & Query Payload content type to be based on
'content-type' header
URL: https://github.com/apache/incubator-druid/pull/4033#discussion_r224450568
##########
File path: server/src/main/java/org/apache/druid/server/QueryResource.java
##########
@@ -156,13 +156,19 @@ public Response cancelQuery(@PathParam("id") String
queryId, @Context final Http
public Response doPost(
final InputStream in,
@QueryParam("pretty") final String pretty,
- @Context final HttpServletRequest req // used to get request
content-type, remote address and auth-related headers
+ @Context final HttpServletRequest req // used to get request
content-type,Accept header, remote address and auth-related headers
) throws IOException
{
final QueryLifecycle queryLifecycle = queryLifecycleFactory.factorize();
Query<?> query = null;
- final ResponseContext context = createContext(req.getContentType(), pretty
!= null);
+ String acceptHeader = req.getHeader("Accept");
+ if (acceptHeader == null || acceptHeader.length() == 0) {
Review comment:
hi @drcrallen - i changed to Strings.isNullOrEmpty. commit pushed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]