You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2006/03/30 15:14:01 UTC

svn commit: r390116 - /jakarta/httpcomponents/trunk/tcconnector/src/java/org/apache/http/tcconnector/impl/HttpConnectionProcessor.java

Author: olegk
Date: Thu Mar 30 05:13:59 2006
New Revision: 390116

URL: http://svn.apache.org/viewcvs?rev=390116&view=rev
Log:
Bug fix causing the content type to be dropped from HTTP responses

Modified:
    jakarta/httpcomponents/trunk/tcconnector/src/java/org/apache/http/tcconnector/impl/HttpConnectionProcessor.java

Modified: jakarta/httpcomponents/trunk/tcconnector/src/java/org/apache/http/tcconnector/impl/HttpConnectionProcessor.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/tcconnector/src/java/org/apache/http/tcconnector/impl/HttpConnectionProcessor.java?rev=390116&r1=390115&r2=390116&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/tcconnector/src/java/org/apache/http/tcconnector/impl/HttpConnectionProcessor.java (original)
+++ jakarta/httpcomponents/trunk/tcconnector/src/java/org/apache/http/tcconnector/impl/HttpConnectionProcessor.java Thu Mar 30 05:13:59 2006
@@ -407,7 +407,7 @@
         }
         String lang = this.coyoteres.getContentLanguage();
         if (lang != null) {
-            this.httpres.setHeader(new Header("Content-Language", lang));
+            this.httpres.addHeader(new Header("Content-Language", lang));
         }
         if (canResponseHaveBody(this.httpreq, this.httpres)) {
             BasicHttpEntity entity = new BasicHttpEntity();
@@ -415,6 +415,7 @@
             if (entity.getContentLength() < 0) {
                 entity.setChunked(true);
             }
+            entity.setContentType(this.coyoteres.getContentType());
             this.httpres.setEntity(entity);
         }
     }