tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hgo...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp NegociationHandler.java
Date Mon, 02 Jul 2001 21:08:55 GMT
hgomez      01/07/02 14:08:55

  Modified:    jk/java/org/apache/ajp NegociationHandler.java
  Log:
  Here it is, the initial autoconf support in java,
  Enjoy and implements real URI/MIMES.
  For now handle all virtual hosts,
  since apache 1.3/2.0 will send virtual '*'
  
  Revision  Changes    Path
  1.2       +23 -0     jakarta-tomcat-connectors/jk/java/org/apache/ajp/NegociationHandler.java
  
  Index: NegociationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/NegociationHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NegociationHandler.java	2001/06/27 15:51:48	1.1
  +++ NegociationHandler.java	2001/07/02 21:08:52	1.2
  @@ -408,6 +408,29 @@
   	throws IOException
       {
   	log("in handleContextQuery :");
  +    String virtualHost = msg.getString();
  +    log("in handleContextQuery for virtual" + virtualHost); 
  +
  +    outBuf.reset();
  +    outBuf.appendByte(JK_AJP14_CONTEXT_INFO_CMD);
  +    outBuf.appendString( virtualHost );
  +
  +    log("in handleContextQuery for virtual " + virtualHost + "examples URI/MIMES");
  +    outBuf.appendString("examples");    // first context - examples
  +    outBuf.appendString("servlet/*");   // examples/servlet/*
  +    outBuf.appendString("*.jsp");       // examples/*.jsp
  +    outBuf.appendString("");            // no more URI/MIMES
  +
  +    log("in handleContextQuery for virtual " + virtualHost + "send admin URI/MIMES"); 
  +    outBuf.appendString("admin");       // second context - admin
  +    outBuf.appendString("servlet/*");   // /admin//servlet/*
  +    outBuf.appendString("*.jsp");       // /admin/*.jsp
  +    outBuf.appendString("");            // no more URI/MIMES
  +
  +    outBuf.appendString("");            // no more contexts
  +    outBuf.end();
  +    ch.send(outBuf);
  +    
   	return (304);
       }
       
  
  
  

Mime
View raw message