You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2017/10/25 11:50:00 UTC
[cxf] branch 3.1.x-fixes updated: [CXF-7541] Blocking ISE
This is an automated email from the ASF dual-hosted git repository.
sergeyb pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.1.x-fixes by this push:
new f939ba1 [CXF-7541] Blocking ISE
f939ba1 is described below
commit f939ba144eadaf82c5d3dbc98d0187ef2d4c2016
Author: Sergey Beryozkin <sb...@gmail.com>
AuthorDate: Wed Oct 25 12:47:29 2017 +0100
[CXF-7541] Blocking ISE
---
.../apache/cxf/transport/http/AbstractHTTPDestination.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
index 8a0152c..333751e 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
@@ -649,9 +649,9 @@ public abstract class AbstractHTTPDestination
if (hasNoResponseContent(outMessage)) {
response.setContentLength(0);
response.flushBuffer();
- response.getOutputStream().close();
+ closeResponseOutputStream(response);
} else if (!getStream) {
- response.getOutputStream().close();
+ closeResponseOutputStream(response);
} else {
responseStream = response.getOutputStream();
}
@@ -662,6 +662,14 @@ public abstract class AbstractHTTPDestination
return responseStream;
}
+ private void closeResponseOutputStream(HttpServletResponse response) throws IOException {
+ try {
+ response.getOutputStream().close();
+ } catch (IllegalStateException ex) {
+ // response.getWriter() has already been called
+ }
+ }
+
private int getReponseCodeFromMessage(Message message) {
Integer i = (Integer)message.get(Message.RESPONSE_CODE);
if (i != null) {
--
To stop receiving notification emails like this one, please contact
['"commits@cxf.apache.org" <co...@cxf.apache.org>'].