[ 
https://issues.apache.org/jira/browse/FLINK-7753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16192676#comment-16192676
 ] 

ASF GitHub Bot commented on FLINK-7753:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4765#discussion_r142893839
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/util/HandlerUtils.java
 ---
    @@ -108,19 +108,25 @@ public static void sendErrorResponse(
         * @param httpRequest originating http request
         * @param message which should be sent
         * @param statusCode of the message to send
    +    * @param forceClose indicates whether to forcibly close the connection 
after the response is sent
         */
        public static void sendResponse(
                        @Nonnull ChannelHandlerContext channelHandlerContext,
                        @Nonnull HttpRequest httpRequest,
                        @Nonnull String message,
    -                   @Nonnull HttpResponseStatus statusCode) {
    +                   @Nonnull HttpResponseStatus statusCode,
    +                   boolean forceClose) {
    --- End diff --
    
    I would prefer to keep the interface (also internal ones) as lean as 
possible. Past experience shows that this can otherwise lead to problems down 
the road (APIs grown too complicated, misuse). If need should arise, then we 
could change it accordingly.


> HandlerUtils should close the channel on error responses
> --------------------------------------------------------
>
>                 Key: FLINK-7753
>                 URL: https://issues.apache.org/jira/browse/FLINK-7753
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Cluster Management, Mesos
>            Reporter: Eron Wright 
>            Assignee: Eron Wright 
>            Priority: Minor
>
> Unexpected errors in the server pipeline correctly cause a 500 error 
> response.   I suggest that such responses also close the channel rather than 
> allowing keep-alive.   This would be a better security posture too since we 
> don't know if the pipeline is corrupt following an unexpected error.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to