tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/http Parameters.java
Date Sat, 10 Feb 2001 23:28:17 GMT
costin      01/02/10 15:28:17

  Modified:    src/share/org/apache/tomcat/core OutputBuffer.java
                        Response.java
               src/share/org/apache/tomcat/util/http Parameters.java
  Log:
  Another small bug in Parameters.
  
  I am reasonably confident we have the right parameter ordering and
  RD and JSPs are working fine now ( with regard to parameters ).
  I have one more test to check in and I'll move to next issue.
  
  Revision  Changes    Path
  1.12      +9 -0      jakarta-tomcat/src/share/org/apache/tomcat/core/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/OutputBuffer.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- OutputBuffer.java	2001/01/07 00:10:33	1.11
  +++ OutputBuffer.java	2001/02/10 23:28:15	1.12
  @@ -107,9 +107,18 @@
       Request req;
       ContextManager cm;
       
  +    public OutputBuffer() {
  +	buf=new byte[defaultBufferSize];
  + 	cbuf=new char[defaultCharBufferSize];
  +    }
  +
       public OutputBuffer(Response resp) {
   	buf=new byte[defaultBufferSize];
    	cbuf=new char[defaultCharBufferSize];
  +	setResponse( resp );
  +    }
  +
  +    public void setResponse( Response resp ) {
   	this.resp=resp;
   	req=resp.getRequest();
   	cm=req.getContextManager();
  
  
  
  1.48      +1 -1      jakarta-tomcat/src/share/org/apache/tomcat/core/Response.java
  
  Index: Response.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Response.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- Response.java	2001/01/23 05:08:38	1.47
  +++ Response.java	2001/02/10 23:28:15	1.48
  @@ -270,7 +270,7 @@
       }
   
       public void finish() throws IOException {
  -        oBuffer.close();
  +	oBuffer.close();
   	ContextManager cm=request.getContextManager();
   	BaseInterceptor reqI[]= request.getContainer().
   	    getInterceptors(Container.H_afterBody);
  
  
  
  1.10      +18 -2     jakarta-tomcat/src/share/org/apache/tomcat/util/http/Parameters.java
  
  Index: Parameters.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/http/Parameters.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Parameters.java	2001/02/10 21:17:42	1.9
  +++ Parameters.java	2001/02/10 23:28:17	1.10
  @@ -203,8 +203,9 @@
        */
       private void merge() {
   	// recursive
  -	//System.out.println("Merging " + this + " with " +
  -	//   parent + " " + didMerge);
  +	//	System.out.println("Merging " + this + " with " +
  +	// parent + " " + didMerge);
  +	//System.out.println( "Before " + paramsAsString());
   	// Local parameters first - they take precedence as in spec.
   	handleQueryParameters();
   
  @@ -215,9 +216,11 @@
   	if( parent==null ) return;
   
   	// Add the parent props to the child ( lower precedence )
  +	parent.merge();
   	Hashtable parentProps=parent.paramHashStringArray;
   	merge2( paramHashStringArray , parentProps);
   	didMerge=true;
  +	//System.out.println( "After " + paramsAsString());
       }
   
   
  @@ -425,4 +428,17 @@
   	}
       }
   
  +    public String paramsAsString() {
  +	StringBuffer sb=new StringBuffer();
  +	Enumeration en= paramHashStringArray.keys();
  +	while( en.hasMoreElements() ) {
  +	    String k=(String)en.nextElement();
  +	    sb.append( k ).append("=");
  +	    String v[]=(String[])paramHashStringArray.get( k );
  +	    for( int i=0; i<v.length; i++ )
  +		sb.append( v[i] ).append(",");
  +	    sb.append("\n");
  +	}
  +	return sb.toString();
  +    }
   }
  
  
  

Mime
View raw message