Handle missing content type
@@ -558,9 +558,9 @@ public class SearchHandler extends LoggingRequestHandler {
return searchChainRegistry;
}
-
private Query queryFromRequest(HttpRequest request, CompiledQueryProfile queryProfile){
- if (request.getMethod() == com.yahoo.jdisc.http.HttpRequest.Method.POST && request.getHeader(com.yahoo.jdisc.http.HttpHeaders.Names.CONTENT_TYPE).equals(JSON_CONTENT_TYPE)) {
+ if (request.getMethod() == com.yahoo.jdisc.http.HttpRequest.Method.POST
+ && JSON_CONTENT_TYPE.equals(request.getHeader(com.yahoo.jdisc.http.HttpHeaders.Names.CONTENT_TYPE))) {
Inspector inspector;
try {
byte[] byteArray = IOUtils.readBytes(request.getData(), 1 << 20);
@@ -612,8 +612,6 @@ public class SearchHandler extends LoggingRequestHandler {
});
}
-
-
}
