cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1057390 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
Date Mon, 10 Jan 2011 22:02:25 GMT
Author: dkulp
Date: Mon Jan 10 22:02:25 2011
New Revision: 1057390

URL: http://svn.apache.org/viewvc?rev=1057390&view=rev
Log:
[CXF-3232] Add a NPE guard around setting the content type

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java?rev=1057390&r1=1057389&r2=1057390&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
Mon Jan 10 22:02:25 2011
@@ -362,7 +362,7 @@ public class Headers {
     protected void copyToResponse(HttpServletResponse response) {
         String contentType = getContentTypeFromMessage();
  
-        if (!headers.containsKey(Message.CONTENT_TYPE)) {
+        if (!headers.containsKey(Message.CONTENT_TYPE) && contentType != null) {
             response.setContentType(contentType);
         }
 



Mime
View raw message