Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/6178#discussion_r196739603
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/AbstractRestHandler.java
---
@@ -70,9 +70,14 @@ protected AbstractRestHandler(
}
@Override
- protected void respondToRequest(ChannelHandlerContext ctx, HttpRequest
httpRequest, HandlerRequest<R, M> handlerRequest, T gateway) throws
RestHandlerException {
+ protected void respondToRequest(ChannelHandlerContext ctx, HttpRequest
httpRequest, HandlerRequest<R, M> handlerRequest, T gateway) {
CompletableFuture<P> response;
+ if (!messageHeaders.acceptsFileUploads() &&
!handlerRequest.getUploadedFiles().isEmpty()) {
+ processRestHandlerException(ctx, httpRequest, new
RestHandlerException("File uploads not allowed.",
HttpResponseStatus.BAD_REQUEST));
+ return;
+ }
--- End diff --
Shouldn't this be moved to the `AbstractHandler`?
---