tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5 CoyoteResponse.java
Date Thu, 05 Sep 2002 07:58:42 GMT
remm        2002/09/05 00:58:42

  Modified:    coyote/src/java/org/apache/coyote/tomcat5
                        CoyoteResponse.java
  Log:
  - Implement what Bill suggested, using MimeHeaders.values(String). Sorry
    for implementing it the wrong way the first time around.
  - This fixes the case sensitivity issue, and it also puts all the logic back
    into MimeHeaders where it belongs.
  
  Revision  Changes    Path
  1.7       +7 -8      jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteResponse.java
  
  Index: CoyoteResponse.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteResponse.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CoyoteResponse.java	4 Sep 2002 18:54:02 -0000	1.6
  +++ CoyoteResponse.java	5 Sep 2002 07:58:42 -0000	1.7
  @@ -814,11 +814,10 @@
        */
       public String[] getHeaderValues(String name) {
   
  -        MimeHeaders headers = coyoteResponse.getMimeHeaders();
  +        Enumeration enum = coyoteResponse.getMimeHeaders().values(name);
           Vector result = new Vector();
  -        for (int i = 0; i < headers.size(); i++) {
  -            if (name.equals( headers.getName(i).toString() ))
  -                result.addElement( headers.getValue(i).toString() );
  +        while (enum.hasMoreElements()) {
  +            result.addElement(enum.nextElement());
           }
           String[] resultArray = new String[result.size()];
           result.copyInto(resultArray);
  
  
  

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


Mime
View raw message