[
https://issues.apache.org/jira/browse/FLINK-7753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16191478#comment-16191478
]
ASF GitHub Bot commented on FLINK-7753:
---------------------------------------
Github user EronWright commented on a diff in the pull request:
https://github.com/apache/flink/pull/4765#discussion_r142713741
--- 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 took this method to be the implementation method having maximum
flexibility. Happy to change it.
> 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)