You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/05/26 20:03:19 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/session SessionId.java

costin      01/05/26 11:03:19

  Modified:    src/share/org/apache/tomcat/modules/server Http10.java
               src/share/org/apache/tomcat/modules/session SessionId.java
  Log:
  Use postReadRequest to extract the session id.
  
  Remove the (unused) charset encoding from HTTP10 ( it doesn't deal
  with encoding, just read bytes )
  
  Revision  Changes    Path
  1.11      +0 -1      jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Http10.java
  
  Index: Http10.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Http10.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Http10.java	2001/05/21 04:22:33	1.10
  +++ Http10.java	2001/05/26 18:03:19	1.11
  @@ -79,7 +79,6 @@
       int bufSize=2048; // default
       int off=0;
       int count=0;
  -    public static final String DEFAULT_CHARACTER_ENCODING = "8859_1";
   
       protected static final int DEFAULT_HEAD_BUFFER_SIZE = 1024;
       protected byte[] oBuffer = new byte[DEFAULT_HEAD_BUFFER_SIZE];
  
  
  
  1.10      +3 -3      jakarta-tomcat/src/share/org/apache/tomcat/modules/session/SessionId.java
  
  Index: SessionId.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/session/SessionId.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SessionId.java	2001/03/21 06:54:01	1.9
  +++ SessionId.java	2001/05/26 18:03:19	1.10
  @@ -117,7 +117,7 @@
        * similar with the priority in apache hooks, right now it's just
        * a config issue.
        */
  -    public int contextMap(Request request ) {
  +    public int postReadRequest(Request request ) {
   	if( request.getRequestedSessionId() != null ) {
   	    // probably Apache already did that for us
   	    return 0;
  @@ -131,10 +131,10 @@
   	// the request.
   	String sig=";jsessionid=";
   	int foundAt=-1;
  -	String uri=request.requestURI().toString();
   	String sessionId;
   	
  -	if ((foundAt=uri.indexOf(sig))!=-1){
  +	if ((foundAt=request.requestURI().indexOf(sig))!=-1){
  +	    String uri=request.requestURI().toString();
   	    sessionId=uri.substring(foundAt+sig.length());
   	    // rewrite URL, do I need to do anything more?
   	    request.requestURI().setString(uri.substring(0, foundAt));