billbarker 02/03/11 21:31:33 Modified: coyote/src/java/org/apache/coyote/tomcat3 CoyoteResponse.java Log: Improve handling of the MimeHeaders. This is much faster (if uglier) than the previous header-by-header copy. Revision Changes Path 1.3 +1 -15 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteResponse.java Index: CoyoteResponse.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteResponse.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CoyoteResponse.java 11 Mar 2002 00:24:10 -0000 1.2 +++ CoyoteResponse.java 12 Mar 2002 05:31:33 -0000 1.3 @@ -78,7 +78,6 @@ class CoyoteResponse extends Response { String reportedname=null; - DateFormat dateFormat=null; org.apache.coyote.Response coyoteResponse=null; ByteChunk outputChunk = new ByteChunk(); @@ -88,15 +87,12 @@ public void setCoyoteResponse(org.apache.coyote.Response cRes) { coyoteResponse = cRes; + headers = coyoteResponse.getMimeHeaders(); } public void init() { super.init(); - dateFormat=new SimpleDateFormat(DateTool.RFC1123_PATTERN, - Locale.US); - dateFormat.setTimeZone(DateTool.GMT_ZONE); } - public void recycle() { super.recycle(); @@ -111,16 +107,6 @@ public void endHeaders() throws IOException { super.endHeaders(); coyoteResponse.setStatus(getStatus()); - - Enumeration names = getMimeHeaders().names(); - while( names.hasMoreElements() ) { - String hname = (String)names.nextElement(); - Enumeration values = getMimeHeaders().values(hname); - while( values.hasMoreElements() ) { - String hvalue = (String)values.nextElement(); - coyoteResponse.addHeader(hname, hvalue); - } - } coyoteResponse.sendHeaders(); }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>