Author: scheu
Date: Fri May 14 01:34:50 2010
New Revision: 944074
URL: http://svn.apache.org/viewvc?rev=944074&view=rev
Log:
AXIS2-4712
Contributor: Lori Van Gulick
remove hardcoded setting of content-type to text/xml from AxisServlet
Modified:
axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/AxisServlet.java
Modified:
axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/AxisServlet.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/AxisServlet.java?rev=944074&r1=944073&r2=944074&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/AxisServlet.java
(original)
+++
axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/AxisServlet.java
Fri May 14 01:34:50 2010
@@ -170,6 +170,12 @@ public class AxisServlet extends HttpSer
getStatus() !=
RequestResponseTransport.
RequestResponseTransportStatus.SIGNALLED)) {
response.setStatus(HttpServletResponse.SC_ACCEPTED);
+ // only set contentType in this scenario, not if response
already set
+ log.debug("Response not written. Setting response
contentType to text/xml; " +
+ "charset="
+msgContext.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING));
+ response.setContentType("text/xml; charset="
+ + msgContext
+
.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING));
}
// Make sure that no data remains in the BufferedOutputStream
even if the message