billbarker    2002/11/09 23:17:13

  Modified:    jk/java/org/apache/jk/server JkCoyoteHandler.java
  Log:
  Porting Remy's changes to Jk2.
  
  Revision  Changes    Path
  1.28      +13 -1     
jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java
  
  Index: JkCoyoteHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- JkCoyoteHandler.java      30 Oct 2002 03:47:27 -0000      1.27
  +++ JkCoyoteHandler.java      10 Nov 2002 07:17:13 -0000      1.28
  @@ -289,7 +289,19 @@
           // XXX add headers
           
           MimeHeaders headers=res.getMimeHeaders();
  -        int numHeaders = headers.size();
  +        String contentType = res.getContentType();
  +     if( contentType != null ) {
  +         headers.setValue("Content-Type").setString(contentType);
  +     }
  +     String contentLanguage = res.getContentLanguage();
  +     if( contentLanguage != null ) {
  +         headers.setValue("Content-Language").setString(contentLanguage);
  +     }
  +     int contentLength = res.getContentLength();
  +     if( contentLength >= 0 ) {
  +         headers.setValue("Content-Length").setInt(contentLength);
  +     }
  +     int numHeaders = headers.size();
           msg.appendInt(numHeaders);
           for( int i=0; i<numHeaders; i++ ) {
               MessageBytes hN=headers.getName(i);
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>

Reply via email to