cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp WarpRequestHandler.java

2001-09-17 Thread pier

pier01/09/17 16:12:01

  Modified:catalina/src/share/org/apache/catalina/connector/warp
WarpRequestHandler.java
  Log:
  Mirroring change for bug 3574 in jakarta-tomcat-4.0 for final release.
  
  Revision  ChangesPath
  1.13  +4 -0  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpRequestHandler.java
  
  Index: WarpRequestHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpRequestHandler.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- WarpRequestHandler.java   2001/09/17 05:10:55 1.12
  +++ WarpRequestHandler.java   2001/09/17 23:12:01 1.13
  @@ -299,6 +299,10 @@
   }
   if (name.equalsIgnoreCase("Accept-Language"))
   parseAcceptLanguage(logger,req,value);
  +
  +if (name.equalsIgnoreCase("Authorization"))
  +req.setAuthorization(value);
  +
   req.addHeader(name,value);
   }
   
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp WarpRequestHandler.java

2001-07-19 Thread pier

pier01/07/19 17:01:32

  Modified:catalina/src/share/org/apache/catalina/connector/warp
WarpRequestHandler.java
  Log:
  New WARP implementation from Jakarta-Tomcat-Connectors
  
  Revision  ChangesPath
  1.8   +125 -126  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpRequestHandler.java
  
  Index: WarpRequestHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpRequestHandler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WarpRequestHandler.java   2001/01/24 23:10:51 1.7
  +++ WarpRequestHandler.java   2001/07/20 00:01:32 1.8
  @@ -2,7 +2,7 @@
*   *
* The Apache Software License,  Version 1.1 *
*   *
  - * Copyright (c) 1999, 2000  The Apache Software Foundation. *
  + *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
*   All rights reserved.*
*   *
* = *
  @@ -56,139 +56,138 @@
* = */
   package org.apache.catalina.connector.warp;
   
  +import java.io.File;
   import java.io.IOException;
  +import java.net.URL;
   
  -/**
  - *
  - *
  - * @author mailto:[EMAIL PROTECTED]";>Pier Fumagalli
  - * @author Copyright © 1999, 2000 http://www.apache.org";>The
  - * Apache Software Foundation.
  - * @version CVS $Id: WarpRequestHandler.java,v 1.7 2001/01/24 23:10:51 pier Exp $
  - */
  -public class WarpRequestHandler extends WarpHandler {
  -
  -/** The WarpReader associated with this WarpConnectionHandler. */
  -private WarpReader reader=new WarpReader();
  -/** The WarpPacket used to write data. */
  -private WarpPacket packet=new WarpPacket();
  -/** Wether we had an error in the request header. */
  -private boolean headererr=false;
  -
  -/** The WarpRequest object associated with this request handler. */
  -protected WarpRequest request=null;
  -/** The WarpRequest object associated with this request handler. */
  -protected WarpResponse response=null;
  -
  -/**
  - * Process a WARP packet.
  - * 
  - * This method is the one which will actually perform the operation of
  - * analyzing the packet and doing whatever needs to be done.
  - * 
  - * This method will return true if another packet is expected for this
  - * RID, or it will return false if this was the last packet for this RID.
  - * When we return false this handler is unregistered, and the Thread
  - * started in the init() method is terminated.
  - *
  - * @param type The WARP packet type.
  - * @param buffer The WARP packet payload.
  - * @return If more packets are expected for this RID, true is returned,
  - * false if this was the last packet.
  - */
  -public boolean process(int type, byte buffer[]) {
  -WarpConnector connector=this.getConnector();
  -WarpEngine engine=(WarpEngine)connector.getContainer();
  -String arg1=null;
  -String arg2=null;
  -int valu=-1;
  -
  -this.reader.reset(buffer);
  -this.packet.reset();
  -try {
  -switch (type) {
  -// The Request method
  -case WarpConstants.TYP_REQINIT_MET:
  -arg1=reader.readString();
  -if (DEBUG) this.debug("Request Method "+arg1);
  -this.request.setMethod(arg1);
  -break;
  -
  -// The Request URI
  -case WarpConstants.TYP_REQINIT_URI:
  -arg1=reader.readString();
  -if (DEBUG) this.debug("Request URI "+arg1);
  -this.request.setRequestURI(arg1);
  -break;
  -
  -// The Request query arguments
  -case WarpConstants.TYP_REQINIT_ARG:
  -arg1=reader.readString();
  -if (DEBUG) this.debug("Request Query Argument "+arg1);
  -this.request.setQueryString(arg1);
  -break;
  -
  -// The Request protocol
  -case WarpConstants.TYP_REQINIT_PRO:
  -arg1=reader.readString();
  -if (DEBUG) this.debug("Request Protocol "+arg1);
  -this.request.setProtocol(arg1);
  -break;
  -
  -// A

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp WarpRequestHandler.java WarpReader.java WarpPacket.java WarpHandler.java WarpEngine.java WarpConstants.java WarpConnector.java WarpConnectionHandler.java

2000-12-07 Thread pier

pier00/12/07 18:57:09

  Modified:catalina/src/share/org/apache/catalina/connector/warp
WarpRequestHandler.java WarpReader.java
WarpPacket.java WarpHandler.java WarpEngine.java
WarpConstants.java WarpConnector.java
WarpConnectionHandler.java
  Log:
  Corrected (hopefully) the CR/LF LF/CR LF/LF issue.
  (Kinda gets hard when you're working on a Mac, a Solaris box and Win2K)
  
  Revision  ChangesPath
  1.4   +145 -145  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpRequestHandler.java
  
  Index: WarpRequestHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpRequestHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WarpRequestHandler.java   2000/12/07 17:38:14 1.3
  +++ WarpRequestHandler.java   2000/12/08 02:57:02 1.4
  @@ -1,145 +1,145 @@
  -/* = *
  - *   *
  - * The Apache Software License,  Version 1.1 *
  - *   *
  - * Copyright (c) 1999, 2000  The Apache Software Foundation. *
  - *   All rights reserved.*
  - *   *
  - * = *
  - *   *
  - * Redistribution and use in source and binary forms,  with or without modi- *
  - * fication, are permitted provided that the following conditions are met:   *
  - *   *
  - * 1. Redistributions of source code  must retain the above copyright notice *
  - *notice, this list of conditions and the following disclaimer.  *
  - *   *
  - * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
  - *notice,  this list of conditions  and the following  disclaimer in the *
  - *documentation and/or other materials provided with the distribution.   *
  - *   *
  - * 3. The end-user documentation  included with the redistribution,  if any, *
  - *must include the following acknowlegement: *
  - *   *
  - *   "This product includes  software developed  by the Apache  Software *
  - *Foundation ."  *
  - *   *
  - *Alternately, this acknowlegement may appear in the software itself, if *
  - *and wherever such third-party acknowlegements normally appear. *
  - *   *
  - * 4. The names  "The  Jakarta  Project",  "Tomcat",  and  "Apache  Software *
  - *Foundation"  must not be used  to endorse or promote  products derived *
  - *from this  software without  prior  written  permission.  For  written *
  - *permission, please contact <[EMAIL PROTECTED]>.*
  - *   *
  - * 5. Products derived from this software may not be called "Apache" nor may *
  - *"Apache" appear in their names without prior written permission of the *
  - *Apache Software Foundation.*
  - *   *
  - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
  - * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
  - * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
  - * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
  - * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
  - * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
  - * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
  - * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
  - * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
  - * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
  - * POSSIBILITY

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp WarpRequestHandler.java WarpConnection.java WarpConnectionHandler.java WarpConstants.java WarpHandler.java

2000-11-30 Thread pier

pier00/11/30 13:59:40

  Modified:catalina/src/share/org/apache/catalina/connector/warp
WarpConnection.java WarpConnectionHandler.java
WarpConstants.java WarpHandler.java
  Added:   catalina/src/share/org/apache/catalina/connector/warp
WarpRequestHandler.java
  Log:
  Bugfixes for multiplexing issues.
  Improving request handling.
  Changed packet type definitios.
  
  Revision  ChangesPath
  1.2   +6 -1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnection.java
  
  Index: WarpConnection.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnection.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WarpConnection.java   2000/11/30 16:34:30 1.1
  +++ WarpConnection.java   2000/11/30 21:59:29 1.2
  @@ -65,7 +65,7 @@
* @author mailto:[EMAIL PROTECTED]">Pier Fumagalli
* @author Copyright © 1999, 2000 http://www.apache.org">The
* Apache Software Foundation.
  - * @version CVS $Id: WarpConnection.java,v 1.1 2000/11/30 16:34:30 pier Exp $
  + * @version CVS $Id: WarpConnection.java,v 1.2 2000/11/30 21:59:29 pier Exp $
*/
   public class WarpConnection implements Runnable {
   
  @@ -136,6 +136,9 @@
   this.log("Premature PAYLOAD end ("+ret+" of "+len+")");
   break;
   }
  +
  +if (DEBUG) this.debug("Received packet RID="+rid+" TYP="+typ);
  +
   // Check if we have the special RID 0x0 (disconnect)
   if (rid==0x0) {
   this.log("Connection closing ("+new String(buf)+")");
  @@ -207,6 +210,7 @@
   out.write(buffer,offset,len);
   out.flush();
   }
  +if (DEBUG) this.debug("Sending packet RID="+rid+" TYP="+type);
   }
   
   /**
  @@ -240,6 +244,7 @@
* false, otherwise return true.
*/
   protected synchronized boolean registerHandler(WarpHandler han, int rid) {
  +if (DEBUG) this.debug("Registering handler for RID "+rid);
   return(this.table.add(han, rid));
   }
   
  
  
  
  1.3   +27 -15
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnectionHandler.java
  
  Index: WarpConnectionHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnectionHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WarpConnectionHandler.java2000/11/30 19:55:59 1.2
  +++ WarpConnectionHandler.java2000/11/30 21:59:30 1.3
  @@ -64,13 +64,15 @@
* @author mailto:[EMAIL PROTECTED]">Pier Fumagalli
* @author Copyright © 1999, 2000 http://www.apache.org">The
* Apache Software Foundation.
  - * @version CVS $Id: WarpConnectionHandler.java,v 1.2 2000/11/30 19:55:59 pier Exp 
$
  + * @version CVS $Id: WarpConnectionHandler.java,v 1.3 2000/11/30 21:59:30 pier Exp 
$
*/
   public class WarpConnectionHandler extends WarpHandler {
   /** The WarpReader associated with this WarpConnectionHandler. */
   private WarpReader reader=new WarpReader();
   /** The WarpPacket used to write data. */
   private WarpPacket packet=new WarpPacket();
  +/** The current request id. */
  +private int request=WarpConstants.RID_MIN;
   
   /**
* Process a WARP packet.
  @@ -93,38 +95,48 @@
   this.packet.reset();
   try {
   switch (type) {
  -case WarpConstants.TYP_HOST:
  +case WarpConstants.TYP_CONINIT_HST:
   // Retrieve this host id
   int hid=123;
  -if (DEBUG) this.debug("HST "+reader.readString()+":"+
  -  reader.readShort()+"="+hid);
  +if (DEBUG) this.debug("CONINIT_HST "+reader.readString()+
  +  ":"+reader.readShort()+"="+hid);
   // Send the HOST ID back to the WARP client
   this.packet.reset();
   this.packet.writeShort(hid);
  -this.send(WarpConstants.TYP_HOST_ID,this.packet);
  +this.send(WarpConstants.TYP_CONINIT_HID,this.packet);
   break;
  -case WarpConstants.TYP_APPLICATION:
  +case WarpConstants.TYP_CONINIT_APP:
   // Retrieve this application id
   int aid=321;
  -if (DEBUG) this.debug("APP "+reader.readStri