11. Araxis Merge File Comparison Report

Produced by Araxis Merge on Mon Mar 6 17:40:24 2006 UTC. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

11.1 Files compared

# Location File Last Modified
1 C:\Merge Test Files\4.0.6\catalina\src\share\org\apache\catalina\connector\http10 HttpProcessor.java Tue Oct 8 15:15:34 2002 UTC
2 C:\Merge Test Files\4.1.18\catalina\src\share\org\apache\catalina\connector\http10 HttpProcessor.java Thu Dec 19 13:49:40 2002 UTC
3 C:\Merge Test Files\4.1.24\catalina\src\share\org\apache\catalina\connector\http10 HttpProcessor.java Wed Mar 19 09:18:36 2003 UTC
Note: Merge considers the second file to be the common ancestor of the others.

11.2 Comparison summary

Description Between
Files 1 and 2
Between
Files 2 and 3
Relative to
Common Ancestor
Text Blocks Lines Text Blocks Lines Text Blocks Lines
Unchanged 7 910 1 938
Changed 3 11 0 0 3 11
Inserted 3 22 0 0 0 0
Removed 0 0 0 0 3 22
Note: An automatic merge would leave 0 conflict(s).

11.3 Comparison options

Whitespace All differences in whitespace within lines are ignored
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

11.4 Active regular expressions

No regular expressions were active.

11.5 Comparison detail

1   /*   1   /*   1   /*
2     *   $Header:   /home/cvs/ jakarta-to mcat-4.0/c atalina/sr c/share/or g/apache/c atalina/co nnector/ht tp10/HttpP rocessor.j ava,v   1. 4.2.2   2002/04/04   17: 46: 0 9   remm   Exp   $   2     *   $Header:   /home/cvs/ jakarta-to mcat-4.0/c atalina/sr c/share/or g/apache/c atalina/co nnector/ht tp10/HttpP rocessor.j ava,v   1. 9   2002/04/04   17: 5 0 :34   remm   Exp   $   2    * $Header : /home/cv s/jakarta- tomcat-4.0 /catalina/ src/share/ org/apache /catalina/ connector/ http10/Htt pProcessor .java,v 1. 9 2002/04/ 04 17:50:3 4 remm Exp  $
3     *   $Revision:   1. 4.2.2   $   3     *   $Revision:   1. 9   $   3    * $Revisi on: 1.9 $
4     *   $Date:   2002/04/04   17: 46: 0 9   $   4     *   $Date:   2002/04/04   17: 5 0 :34   $   4    * $Date:  2002/04/04  17:50:34  $
5    *   5    *   5    *
6    * ======= ========== ========== ========== ========== ========== ========== =   6    * ======= ========== ========== ========== ========== ========== ========== =   6    * ======= ========== ========== ========== ========== ========== ========== =
7    *   7    *   7    *
8    * The Apa che Softwa re License , Version  1.1   8    * The Apa che Softwa re License , Version  1.1   8    * The Apa che Softwa re License , Version  1.1
9    *   9    *   9    *
10    * Copyrig ht (c) 199 9 The Apac he Softwar e Foundati on.  All r ights   10    * Copyrig ht (c) 199 9 The Apac he Softwar e Foundati on.  All r ights   10    * Copyrig ht (c) 199 9 The Apac he Softwar e Foundati on.  All r ights
11    * reserve d.   11    * reserve d.   11    * reserve d.
12    *   12    *   12    *
13    * Redistr ibution an d use in s ource and  binary for ms, with o r without   13    * Redistr ibution an d use in s ource and  binary for ms, with o r without   13    * Redistr ibution an d use in s ource and  binary for ms, with o r without
14    * modific ation, are  permitted  provided  that the f ollowing c onditions   14    * modific ation, are  permitted  provided  that the f ollowing c onditions   14    * modific ation, are  permitted  provided  that the f ollowing c onditions
15    * are met :   15    * are met :   15    * are met :
16    *   16    *   16    *
17    * 1. Redi stribution s of sourc e code mus t retain t he above c opyright   17    * 1. Redi stribution s of sourc e code mus t retain t he above c opyright   17    * 1. Redi stribution s of sourc e code mus t retain t he above c opyright
18    *    noti ce, this l ist of con ditions an d the foll owing disc laimer.   18    *    noti ce, this l ist of con ditions an d the foll owing disc laimer.   18    *    noti ce, this l ist of con ditions an d the foll owing disc laimer.
19    *   19    *   19    *
20    * 2. Redi stribution s in binar y form mus t reproduc e the abov e copyrigh t   20    * 2. Redi stribution s in binar y form mus t reproduc e the abov e copyrigh t   20    * 2. Redi stribution s in binar y form mus t reproduc e the abov e copyrigh t
21    *    noti ce, this l ist of con ditions an d the foll owing disc laimer in   21    *    noti ce, this l ist of con ditions an d the foll owing disc laimer in   21    *    noti ce, this l ist of con ditions an d the foll owing disc laimer in
22    *    the  documentat ion and/or  other mat erials pro vided with  the   22    *    the  documentat ion and/or  other mat erials pro vided with  the   22    *    the  documentat ion and/or  other mat erials pro vided with  the
23    *    dist ribution.   23    *    dist ribution.   23    *    dist ribution.
24    *   24    *   24    *
25    * 3. The  end-user d ocumentati on include d with the  redistrib ution, if   25    * 3. The  end-user d ocumentati on include d with the  redistrib ution, if   25    * 3. The  end-user d ocumentati on include d with the  redistrib ution, if
26    *    any,  must incl ude the fo llowing ac knowlegeme nt:   26    *    any,  must incl ude the fo llowing ac knowlegeme nt:   26    *    any,  must incl ude the fo llowing ac knowlegeme nt:
27    *       " This produ ct include s software  developed  by the   27    *       " This produ ct include s software  developed  by the   27    *       " This produ ct include s software  developed  by the
28    *         Apache Sof tware Foun dation (ht tp://www.a pache.org/ )."   28    *         Apache Sof tware Foun dation (ht tp://www.a pache.org/ )."   28    *         Apache Sof tware Foun dation (ht tp://www.a pache.org/ )."
29    *    Alte rnately, t his acknow legement m ay appear  in the sof tware itse lf,   29    *    Alte rnately, t his acknow legement m ay appear  in the sof tware itse lf,   29    *    Alte rnately, t his acknow legement m ay appear  in the sof tware itse lf,
30    *    if a nd whereve r such thi rd-party a cknowlegem ents norma lly appear .   30    *    if a nd whereve r such thi rd-party a cknowlegem ents norma lly appear .   30    *    if a nd whereve r such thi rd-party a cknowlegem ents norma lly appear .
31    *   31    *   31    *
32    * 4. The  names "The  Jakarta P roject", " Tomcat", a nd "Apache  Software   32    * 4. The  names "The  Jakarta P roject", " Tomcat", a nd "Apache  Software   32    * 4. The  names "The  Jakarta P roject", " Tomcat", a nd "Apache  Software
33    *    Foun dation" mu st not be  used to en dorse or p romote pro ducts deri ved   33    *    Foun dation" mu st not be  used to en dorse or p romote pro ducts deri ved   33    *    Foun dation" mu st not be  used to en dorse or p romote pro ducts deri ved
34    *    from  this soft ware witho ut prior w ritten per mission. F or written   34    *    from  this soft ware witho ut prior w ritten per mission. F or written   34    *    from  this soft ware witho ut prior w ritten per mission. F or written
35    *    perm ission, pl ease conta ct apache@ apache.org .   35    *    perm ission, pl ease conta ct apache@ apache.org .   35    *    perm ission, pl ease conta ct apache@ apache.org .
36    *   36    *   36    *
37    * 5. Prod ucts deriv ed from th is softwar e may not  be called  "Apache"   37    * 5. Prod ucts deriv ed from th is softwar e may not  be called  "Apache"   37    * 5. Prod ucts deriv ed from th is softwar e may not  be called  "Apache"
38    *    nor  may "Apach e" appear  in their n ames witho ut prior w ritten   38    *    nor  may "Apach e" appear  in their n ames witho ut prior w ritten   38    *    nor  may "Apach e" appear  in their n ames witho ut prior w ritten
39    *    perm ission of  the Apache  Group.   39    *    perm ission of  the Apache  Group.   39    *    perm ission of  the Apache  Group.
40    *   40    *   40    *
41    * THIS SO FTWARE IS  PROVIDED ` `AS IS'' A ND ANY EXP RESSED OR  IMPLIED   41    * THIS SO FTWARE IS  PROVIDED ` `AS IS'' A ND ANY EXP RESSED OR  IMPLIED   41    * THIS SO FTWARE IS  PROVIDED ` `AS IS'' A ND ANY EXP RESSED OR  IMPLIED
42    * WARRANT IES, INCLU DING, BUT  NOT LIMITE D TO, THE  IMPLIED WA RRANTIES   42    * WARRANT IES, INCLU DING, BUT  NOT LIMITE D TO, THE  IMPLIED WA RRANTIES   42    * WARRANT IES, INCLU DING, BUT  NOT LIMITE D TO, THE  IMPLIED WA RRANTIES
43    * OF MERC HANTABILIT Y AND FITN ESS FOR A  PARTICULAR  PURPOSE A RE   43    * OF MERC HANTABILIT Y AND FITN ESS FOR A  PARTICULAR  PURPOSE A RE   43    * OF MERC HANTABILIT Y AND FITN ESS FOR A  PARTICULAR  PURPOSE A RE
44    * DISCLAI MED.  IN N O EVENT SH ALL THE AP ACHE SOFTW ARE FOUNDA TION OR   44    * DISCLAI MED.  IN N O EVENT SH ALL THE AP ACHE SOFTW ARE FOUNDA TION OR   44    * DISCLAI MED.  IN N O EVENT SH ALL THE AP ACHE SOFTW ARE FOUNDA TION OR
45    * ITS CON TRIBUTORS  BE LIABLE  FOR ANY DI RECT, INDI RECT, INCI DENTAL,   45    * ITS CON TRIBUTORS  BE LIABLE  FOR ANY DI RECT, INDI RECT, INCI DENTAL,   45    * ITS CON TRIBUTORS  BE LIABLE  FOR ANY DI RECT, INDI RECT, INCI DENTAL,
46    * SPECIAL , EXEMPLAR Y, OR CONS EQUENTIAL  DAMAGES (I NCLUDING,  BUT NOT   46    * SPECIAL , EXEMPLAR Y, OR CONS EQUENTIAL  DAMAGES (I NCLUDING,  BUT NOT   46    * SPECIAL , EXEMPLAR Y, OR CONS EQUENTIAL  DAMAGES (I NCLUDING,  BUT NOT
47    * LIMITED  TO, PROCU REMENT OF  SUBSTITUTE  GOODS OR  SERVICES;  LOSS OF   47    * LIMITED  TO, PROCU REMENT OF  SUBSTITUTE  GOODS OR  SERVICES;  LOSS OF   47    * LIMITED  TO, PROCU REMENT OF  SUBSTITUTE  GOODS OR  SERVICES;  LOSS OF
48    * USE, DA TA, OR PRO FITS; OR B USINESS IN TERRUPTION ) HOWEVER  CAUSED AND   48    * USE, DA TA, OR PRO FITS; OR B USINESS IN TERRUPTION ) HOWEVER  CAUSED AND   48    * USE, DA TA, OR PRO FITS; OR B USINESS IN TERRUPTION ) HOWEVER  CAUSED AND
49    * ON ANY  THEORY OF  LIABILITY,  WHETHER I N CONTRACT , STRICT L IABILITY,   49    * ON ANY  THEORY OF  LIABILITY,  WHETHER I N CONTRACT , STRICT L IABILITY,   49    * ON ANY  THEORY OF  LIABILITY,  WHETHER I N CONTRACT , STRICT L IABILITY,
50    * OR TORT  (INCLUDIN G NEGLIGEN CE OR OTHE RWISE) ARI SING IN AN Y WAY OUT   50    * OR TORT  (INCLUDIN G NEGLIGEN CE OR OTHE RWISE) ARI SING IN AN Y WAY OUT   50    * OR TORT  (INCLUDIN G NEGLIGEN CE OR OTHE RWISE) ARI SING IN AN Y WAY OUT
51    * OF THE  USE OF THI S SOFTWARE , EVEN IF  ADVISED OF  THE POSSI BILITY OF   51    * OF THE  USE OF THI S SOFTWARE , EVEN IF  ADVISED OF  THE POSSI BILITY OF   51    * OF THE  USE OF THI S SOFTWARE , EVEN IF  ADVISED OF  THE POSSI BILITY OF
52    * SUCH DA MAGE.   52    * SUCH DA MAGE.   52    * SUCH DA MAGE.
53    * ======= ========== ========== ========== ========== ========== ========== =   53    * ======= ========== ========== ========== ========== ========== ========== =   53    * ======= ========== ========== ========== ========== ========== ========== =
54    *   54    *   54    *
55    * This so ftware con sists of v oluntary c ontributio ns made by  many   55    * This so ftware con sists of v oluntary c ontributio ns made by  many   55    * This so ftware con sists of v oluntary c ontributio ns made by  many
56    * individ uals on be half of th e Apache S oftware Fo undation.   For more   56    * individ uals on be half of th e Apache S oftware Fo undation.   For more   56    * individ uals on be half of th e Apache S oftware Fo undation.   For more
57    * informa tion on th e Apache S oftware Fo undation,  please see   57    * informa tion on th e Apache S oftware Fo undation,  please see   57    * informa tion on th e Apache S oftware Fo undation,  please see
58    * <http:/ /www.apach e.org/>.   58    * <http:/ /www.apach e.org/>.   58    * <http:/ /www.apach e.org/>.
59    *   59    *   59    *
60    * [Additi onal notic es, if req uired by p rior licen sing condi tions]   60    * [Additi onal notic es, if req uired by p rior licen sing condi tions]   60    * [Additi onal notic es, if req uired by p rior licen sing condi tions]
61    *   61    *   61    *
62    */   62    */   62    */
63     63     63  
64     64     64  
65   package or g.apache.c atalina.co nnector.ht tp10;   65   package or g.apache.c atalina.co nnector.ht tp10;   65   package or g.apache.c atalina.co nnector.ht tp10;
66     66     66  
67     67     67  
68   import jav a.io.Buffe redInputSt ream;   68   import jav a.io.Buffe redInputSt ream;   68   import jav a.io.Buffe redInputSt ream;
69   import jav a.io.Input Stream;   69   import jav a.io.Input Stream;   69   import jav a.io.Input Stream;
70   import jav a.io.IOExc eption;   70   import jav a.io.IOExc eption;   70   import jav a.io.IOExc eption;
71   import jav a.io.Outpu tStream;   71   import jav a.io.Outpu tStream;   71   import jav a.io.Outpu tStream;
72   import jav a.net.Inet Address;   72   import jav a.net.Inet Address;   72   import jav a.net.Inet Address;
73   import jav a.net.Sock et;   73   import jav a.net.Sock et;   73   import jav a.net.Sock et;
74   import jav a.util.NoS uchElement Exception;   74   import jav a.util.NoS uchElement Exception;   74   import jav a.util.NoS uchElement Exception;
75   import jav a.util.Str ingTokeniz er;   75   import jav a.util.Str ingTokeniz er;   75   import jav a.util.Str ingTokeniz er;
76   import jav a.util.Loc ale;   76   import jav a.util.Loc ale;   76   import jav a.util.Loc ale;
77   import jav a.util.Has htable;   77   import jav a.util.Has htable;   77   import jav a.util.Has htable;
78   import jav a.util.Vec tor;   78   import jav a.util.Vec tor;   78   import jav a.util.Vec tor;
79   import jav a.util.Enu meration;   79   import jav a.util.Enu meration;   79   import jav a.util.Enu meration;
80   import jav ax.servlet .ServletEx ception;   80   import jav ax.servlet .ServletEx ception;   80   import jav ax.servlet .ServletEx ception;
81   import jav ax.servlet .http.Cook ie;   81   import jav ax.servlet .http.Cook ie;   81   import jav ax.servlet .http.Cook ie;
82   import jav ax.servlet .http.Http ServletReq uest;   82   import jav ax.servlet .http.Http ServletReq uest;   82   import jav ax.servlet .http.Http ServletReq uest;
83   import jav ax.servlet .http.Http ServletRes ponse;   83   import jav ax.servlet .http.Http ServletRes ponse;   83   import jav ax.servlet .http.Http ServletRes ponse;
84   import org .apache.ca talina.Con nector;   84   import org .apache.ca talina.Con nector;   84   import org .apache.ca talina.Con nector;
85   import org .apache.ca talina.Con tainer;   85   import org .apache.ca talina.Con tainer;   85   import org .apache.ca talina.Con tainer;
86   import org .apache.ca talina.Glo bals;   86   import org .apache.ca talina.Glo bals;   86   import org .apache.ca talina.Glo bals;
87   import org .apache.ca talina.Htt pRequest;   87   import org .apache.ca talina.Htt pRequest;   87   import org .apache.ca talina.Htt pRequest;
88   import org .apache.ca talina.Htt pResponse;   88   import org .apache.ca talina.Htt pResponse;   88   import org .apache.ca talina.Htt pResponse;
89   import org .apache.ca talina.Lif ecycle;   89   import org .apache.ca talina.Lif ecycle;   89   import org .apache.ca talina.Lif ecycle;
90   import org .apache.ca talina.Lif ecycleEven t;   90   import org .apache.ca talina.Lif ecycleEven t;   90   import org .apache.ca talina.Lif ecycleEven t;
91   import org .apache.ca talina.Lif ecycleExce ption;   91   import org .apache.ca talina.Lif ecycleExce ption;   91   import org .apache.ca talina.Lif ecycleExce ption;
92   import org .apache.ca talina.Lif ecycleList ener;   92   import org .apache.ca talina.Lif ecycleList ener;   92   import org .apache.ca talina.Lif ecycleList ener;
93   import org .apache.ca talina.Log ger;   93   import org .apache.ca talina.Log ger;   93   import org .apache.ca talina.Log ger;
94   import org .apache.ca talina.uti l.RequestU til;   94   import org .apache.ca talina.uti l.RequestU til;   94   import org .apache.ca talina.uti l.RequestU til;
95   import org .apache.ca talina.uti l.Lifecycl eSupport;   95   import org .apache.ca talina.uti l.Lifecycl eSupport;   95   import org .apache.ca talina.uti l.Lifecycl eSupport;
    96   import org .apache.ca talina.uti l.ServerIn fo;   96   import org .apache.ca talina.uti l.ServerIn fo;
96   import org .apache.ca talina.uti l.StringMa nager;   97   import org .apache.ca talina.uti l.StringMa nager;   97   import org .apache.ca talina.uti l.StringMa nager;
97     98     98  
98     99     99  
99   /**   100   /**   100   /**
100    * Impleme ntation of  a request  processor  (and its  associated  thread) t hat may   101    * Impleme ntation of  a request  processor  (and its  associated  thread) t hat may   101    * Impleme ntation of  a request  processor  (and its  associated  thread) t hat may
101    * be used  by an Htt pConnector  to proces s individu al request s.  The co nnector   102    * be used  by an Htt pConnector  to proces s individu al request s.  The co nnector   102    * be used  by an Htt pConnector  to proces s individu al request s.  The co nnector
102    * will al locate a p rocessor f rom its po ol, assign  a particu lar socket  to it,   103    * will al locate a p rocessor f rom its po ol, assign  a particu lar socket  to it,   103    * will al locate a p rocessor f rom its po ol, assign  a particu lar socket  to it,
103    * and the  processor  will then  execute t he process ing requir ed to comp lete   104    * and the  processor  will then  execute t he process ing requir ed to comp lete   104    * and the  processor  will then  execute t he process ing requir ed to comp lete
104    * the req uest.  Whe n the proc essor is c ompleted,  it will re cycle itse lf.   105    * the req uest.  Whe n the proc essor is c ompleted,  it will re cycle itse lf.   105    * the req uest.  Whe n the proc essor is c ompleted,  it will re cycle itse lf.
105    *   106    *   106    *
106    * @author  Craig R.  McClanahan   107    * @author  Craig R.  McClanahan   107    * @author  Craig R.  McClanahan
107     *   @version   $Revision:   1. 4.2.2   $   $Date:   2002/04/04   17: 46: 0 9   $   108     *   @version   $Revision:   1. 9   $   $Date:   2002/04/04   17: 5 0 :34   $   108    * @versio n $Revisio n: 1.9 $ $ Date: 2002 /04/04 17: 50:34 $
    109    * @deprec ated   109    * @deprec ated
108    */   110    */   110    */
109     111     111  
110   final clas s HttpProc essor   112   final clas s HttpProc essor   112   final clas s HttpProc essor
111       implem ents Lifec ycle, Runn able {   113       implem ents Lifec ycle, Runn able {   113       implem ents Lifec ycle, Runn able {
112     114     114  
113     115     115  
    116       // --- ---------- ---------- ---------- ---------- ----------  Manifest  Constants   116       // --- ---------- ---------- ---------- ---------- ----------  Manifest  Constants
    117     117  
    118     118  
    119       /**   119       /**
    120        * Ser ver inform ation stri ng for thi s server.   120        * Ser ver inform ation stri ng for thi s server.
    121        */   121        */
    122       privat e static f inal Strin g SERVER_I NFO =   122       privat e static f inal Strin g SERVER_I NFO =
    123           Se rverInfo.g etServerIn fo() + " ( HTTP/1.0 C onnector)" ;   123           Se rverInfo.g etServerIn fo() + " ( HTTP/1.0 C onnector)" ;
    124     124  
    125     125  
114       // --- ---------- ---------- ---------- ---------- ---------- ------ Con structors   126       // --- ---------- ---------- ---------- ---------- ---------- ------ Con structors   126       // --- ---------- ---------- ---------- ---------- ---------- ------ Con structors
115     127     127  
116     128     128  
117       /**   129       /**   129       /**
118        * Con struct a n ew HttpPro cessor ass ociated wi th the spe cified con nector.   130        * Con struct a n ew HttpPro cessor ass ociated wi th the spe cified con nector.   130        * Con struct a n ew HttpPro cessor ass ociated wi th the spe cified con nector.
119        *   131        *   131        *
120        * @pa ram connec tor HttpCo nnector th at owns th is process or   132        * @pa ram connec tor HttpCo nnector th at owns th is process or   132        * @pa ram connec tor HttpCo nnector th at owns th is process or
121        * @pa ram id Ide ntifier of  this Http Processor  (unique pe r connecto r)   133        * @pa ram id Ide ntifier of  this Http Processor  (unique pe r connecto r)   133        * @pa ram id Ide ntifier of  this Http Processor  (unique pe r connecto r)
122        */   134        */   134        */
123       public  HttpProce ssor(HttpC onnector c onnector,  int id) {   135       public  HttpProce ssor(HttpC onnector c onnector,  int id) {   135       public  HttpProce ssor(HttpC onnector c onnector,  int id) {
124     136     136  
125           su per();   137           su per();   137           su per();
126           th is.connect or = conne ctor;   138           th is.connect or = conne ctor;   138           th is.connect or = conne ctor;
127           th is.debug =  connector .getDebug( );   139           th is.debug =  connector .getDebug( );   139           th is.debug =  connector .getDebug( );
128           th is.id = id ;   140           th is.id = id ;   140           th is.id = id ;
129           th is.proxyNa me = conne ctor.getPr oxyName();   141           th is.proxyNa me = conne ctor.getPr oxyName();   141           th is.proxyNa me = conne ctor.getPr oxyName();
130           th is.proxyPo rt = conne ctor.getPr oxyPort();   142           th is.proxyPo rt = conne ctor.getPr oxyPort();   142           th is.proxyPo rt = conne ctor.getPr oxyPort();
131           th is.request  = (HttpRe questImpl)  connector .createReq uest();   143           th is.request  = (HttpRe questImpl)  connector .createReq uest();   143           th is.request  = (HttpRe questImpl)  connector .createReq uest();
132           th is.respons e = (HttpR esponseImp l) connect or.createR esponse();   144           th is.respons e = (HttpR esponseImp l) connect or.createR esponse();   144           th is.respons e = (HttpR esponseImp l) connect or.createR esponse();
133           th is.serverP ort = conn ector.getP ort();   145           th is.serverP ort = conn ector.getP ort();   145           th is.serverP ort = conn ector.getP ort();
134           th is.threadN ame =   146           th is.threadN ame =   146           th is.threadN ame =
135              "HttpProce ssor[" + c onnector.g etPort() +  "][" + id  + "]";   147              "HttpProce ssor[" + c onnector.g etPort() +  "][" + id  + "]";   147              "HttpProce ssor[" + c onnector.g etPort() +  "][" + id  + "]";
136     148     148  
137       }   149       }   149       }
138     150     150  
139     151     151  
140       // --- ---------- ---------- ---------- ---------- ----------  Instance  Variables   152       // --- ---------- ---------- ---------- ---------- ----------  Instance  Variables   152       // --- ---------- ---------- ---------- ---------- ----------  Instance  Variables
141     153     153  
142     154     154  
143       /**   155       /**   155       /**
144        * Is  there a ne w socket a vailable?   156        * Is  there a ne w socket a vailable?   156        * Is  there a ne w socket a vailable?
145        */   157        */   157        */
146       privat e boolean  available  = false;   158       privat e boolean  available  = false;   158       privat e boolean  available  = false;
147     159     159  
148     160     160  
149       /**   161       /**   161       /**
150        * The  HttpConne ctor with  which this  processor  is associ ated.   162        * The  HttpConne ctor with  which this  processor  is associ ated.   162        * The  HttpConne ctor with  which this  processor  is associ ated.
151        */   163        */   163        */
152       privat e HttpConn ector conn ector = nu ll;   164       privat e HttpConn ector conn ector = nu ll;   164       privat e HttpConn ector conn ector = nu ll;
153     165     165  
154     166     166  
155       /**   167       /**   167       /**
156        * The  debugging  detail le vel for th is compone nt.   168        * The  debugging  detail le vel for th is compone nt.   168        * The  debugging  detail le vel for th is compone nt.
157        */   169        */   169        */
158       privat e int debu g = 0;   170       privat e int debu g = 0;   170       privat e int debu g = 0;
159     171     171  
160     172     172  
161       /**   173       /**   173       /**
(438 unchanged lines omitted)
600                    rest  = "";   612                    rest  = "";   612                    rest  = "";
601                }   613                }   613                }
602                request. setRequest edSessionU RL(true);   614                request. setRequest edSessionU RL(true);   614                request. setRequest edSessionU RL(true);
603                uri = ur i.substrin g(0, semic olon) + re st;   615                uri = ur i.substrin g(0, semic olon) + re st;   615                uri = ur i.substrin g(0, semic olon) + re st;
604                if (debu g >= 1)   616                if (debu g >= 1)   616                if (debu g >= 1)
605                    log( " Requeste d URL sess ion id is  " +   617                    log( " Requeste d URL sess ion id is  " +   617                    log( " Requeste d URL sess ion id is  " +
606                         ((HttpServ letRequest ) request. getRequest ()).getReq uestedSess ionId());   618                         ((HttpServ letRequest ) request. getRequest ()).getReq uestedSess ionId());   618                         ((HttpServ letRequest ) request. getRequest ()).getReq uestedSess ionId());
607           }  else {   619           }  else {   619           }  else {
608                request. setRequest edSessionI d(null);   620                request. setRequest edSessionI d(null);   620                request. setRequest edSessionI d(null);
609                request. setRequest edSessionU RL(false);   621                request. setRequest edSessionU RL(false);   621                request. setRequest edSessionU RL(false);
610           }   622           }   622           }
611     623     623  
612           //  Set the c orrespondi ng request  propertie s   624           //  Set the c orrespondi ng request  propertie s   624           //  Set the c orrespondi ng request  propertie s
613           (( HttpReques t) request ).setMetho d(method);   625           (( HttpReques t) request ).setMetho d(method);   625           (( HttpReques t) request ).setMetho d(method);
614           re quest.setP rotocol(pr otocol);   626           re quest.setP rotocol(pr otocol);   626           re quest.setP rotocol(pr otocol);
615           (( HttpReques t) request ).setReque stURI(uri) ;   627           (( HttpReques t) request ).setReque stURI(uri) ;   627           (( HttpReques t) request ).setReque stURI(uri) ;
616           re quest.setS ecure(fals e);        // No SSL  support   628           re quest.setS ecure(fals e);        // No SSL  support   628           re quest.setS ecure(fals e);        // No SSL  support
617           re quest.setS cheme("htt p");       // No SSL  support   629           re quest.setS cheme("htt p");       // No SSL  support   629           re quest.setS cheme("htt p");       // No SSL  support
618     630     630  
619           if  (debug >=  1)   631           if  (debug >=  1)   631           if  (debug >=  1)
620                log(" Re quest is "  + method  + " for "  + uri);   632                log(" Re quest is "  + method  + " for "  + uri);   632                log(" Re quest is "  + method  + " for "  + uri);
621     633     633  
622       }   634       }   634       }
623     635     635  
624     636     636  
625       /**   637       /**   637       /**
626        * Pro cess an in coming HTT P request  on the Soc ket that h as been as signed   638        * Pro cess an in coming HTT P request  on the Soc ket that h as been as signed   638        * Pro cess an in coming HTT P request  on the Soc ket that h as been as signed
627        * to  this Proce ssor.  Any  exception s that occ ur during  processing  must be   639        * to  this Proce ssor.  Any  exception s that occ ur during  processing  must be   639        * to  this Proce ssor.  Any  exception s that occ ur during  processing  must be
628        * swa llowed and  dealt wit h.   640        * swa llowed and  dealt wit h.   640        * swa llowed and  dealt wit h.
629        *   641        *   641        *
630        * @pa ram socket  The socke t on which  we are co nnected to  the clien t   642        * @pa ram socket  The socke t on which  we are co nnected to  the clien t   642        * @pa ram socket  The socke t on which  we are co nnected to  the clien t
631        */   643        */   643        */
632       privat e void pro cess(Socke t socket)  {   644       privat e void pro cess(Socke t socket)  {   644       privat e void pro cess(Socke t socket)  {
633     645     645  
634           bo olean ok =  true;   646           bo olean ok =  true;   646           bo olean ok =  true;
635           In putStream  input = nu ll;   647           In putStream  input = nu ll;   647           In putStream  input = nu ll;
636           Ou tputStream  output =  null;   648           Ou tputStream  output =  null;   648           Ou tputStream  output =  null;
637     649     649  
638           //  Construct  and initi alize the  objects we  will need   650           //  Construct  and initi alize the  objects we  will need   650           //  Construct  and initi alize the  objects we  will need
639           tr y {   651           tr y {   651           tr y {
640                input =  new Buffer edInputStr eam(socket .getInputS tream(),   652                input =  new Buffer edInputStr eam(socket .getInputS tream(),   652                input =  new Buffer edInputStr eam(socket .getInputS tream(),
641                                                   connec tor.getBuf ferSize()) ;   653                                                   connec tor.getBuf ferSize()) ;   653                                                   connec tor.getBuf ferSize()) ;
642                request. setStream( input);   654                request. setStream( input);   654                request. setStream( input);
643                request. setRespons e(response );   655                request. setRespons e(response );   655                request. setRespons e(response );
644                output =  socket.ge tOutputStr eam();   656                output =  socket.ge tOutputStr eam();   656                output =  socket.ge tOutputStr eam();
645                response .setStream (output);   657                response .setStream (output);   657                response .setStream (output);
646                response .setReques t(request) ;   658                response .setReques t(request) ;   658                response .setReques t(request) ;
647                ((HttpSe rvletRespo nse) respo nse.getRes ponse()).s etHeader   659                ((HttpSe rvletRespo nse) respo nse.getRes ponse()).s etHeader   659                ((HttpSe rvletRespo nse) respo nse.getRes ponse()).s etHeader
648                     ("Server",   Constants. S erver I nfo );   660                     ("Server",
  S ERVER_ I NFO );
  660                    ("Se rver", SER VER_INFO);
649           }  catch (Exc eption e)  {   661           }  catch (Exc eption e)  {   661           }  catch (Exc eption e)  {
650                log("pro cess.creat e", e);   662                log("pro cess.creat e", e);   662                log("pro cess.creat e", e);
651                ok = fal se;   663                ok = fal se;   663                ok = fal se;
652           }   664           }   664           }
653     665     665  
654           //  Parse the  incoming  request   666           //  Parse the  incoming  request   666           //  Parse the  incoming  request
655           tr y {   667           tr y {   667           tr y {
656                if (ok)  {   668                if (ok)  {   668                if (ok)  {
657                    pars eConnectio n(socket);   669                    pars eConnectio n(socket);   669                    pars eConnectio n(socket);
658                    pars eRequest(i nput);   670                    pars eRequest(i nput);   670                    pars eRequest(i nput);
659                    if ( !request.g etRequest( ).getProto col().star tsWith("HT TP/0"))   671                    if ( !request.g etRequest( ).getProto col().star tsWith("HT TP/0"))   671                    if ( !request.g etRequest( ).getProto col().star tsWith("HT TP/0"))
660                         parseHeade rs(input);   672                         parseHeade rs(input);   672                         parseHeade rs(input);
661                }   673                }   673                }
662           }  catch (Exc eption e)  {   674           }  catch (Exc eption e)  {   674           }  catch (Exc eption e)  {
663                try {   675                try {   675                try {
664                    log( "process.p arse", e);   676                    log( "process.p arse", e);   676                    log( "process.p arse", e);
665                    ((Ht tpServletR esponse) r esponse.ge tResponse( )).sendErr or   677                    ((Ht tpServletR esponse) r esponse.ge tResponse( )).sendErr or   677                    ((Ht tpServletR esponse) r esponse.ge tResponse( )).sendErr or
666                         (HttpServl etResponse .SC_BAD_RE QUEST);   678                         (HttpServl etResponse .SC_BAD_RE QUEST);   678                         (HttpServl etResponse .SC_BAD_RE QUEST);
667                } catch  (Exception  f) {   679                } catch  (Exception  f) {   679                } catch  (Exception  f) {
668                    ;   680                    ;   680                    ;
669                }   681                }   681                }
670           }   682           }   682           }
671     683     683  
672           //  Ask our C ontainer t o process  this reque st   684           //  Ask our C ontainer t o process  this reque st   684           //  Ask our C ontainer t o process  this reque st
673           tr y {   685           tr y {   685           tr y {
674                if (ok)  {   686                if (ok)  {   686                if (ok)  {
675                    conn ector.getC ontainer() .invoke(re quest, res ponse);   687                    conn ector.getC ontainer() .invoke(re quest, res ponse);   687                    conn ector.getC ontainer() .invoke(re quest, res ponse);
676                }   688                }   688                }
677           }  catch (Ser vletExcept ion e) {   689           }  catch (Ser vletExcept ion e) {   689           }  catch (Ser vletExcept ion e) {
678                log("pro cess.invok e", e);   690                log("pro cess.invok e", e);   690                log("pro cess.invok e", e);
679                try {   691                try {   691                try {
680                    ((Ht tpServletR esponse) r esponse.ge tResponse( )).sendErr or   692                    ((Ht tpServletR esponse) r esponse.ge tResponse( )).sendErr or   692                    ((Ht tpServletR esponse) r esponse.ge tResponse( )).sendErr or
681                         (HttpServl etResponse .SC_INTERN AL_SERVER_ ERROR);   693                         (HttpServl etResponse .SC_INTERN AL_SERVER_ ERROR);   693                         (HttpServl etResponse .SC_INTERN AL_SERVER_ ERROR);
682                } catch  (Exception  f) {   694                } catch  (Exception  f) {   694                } catch  (Exception  f) {
683                    ;   695                    ;   695                    ;
684                }   696                }   696                }
685                ok = fal se;   697                ok = fal se;   697                ok = fal se;
686           }  catch (Thr owable e)  {   698           }  catch (Thr owable e)  {   698           }  catch (Thr owable e)  {
687                log("pro cess.invok e", e);   699                log("pro cess.invok e", e);   699                log("pro cess.invok e", e);
688                try {   700                try {   700                try {
689                    ((Ht tpServletR esponse) r esponse.ge tResponse( )).sendErr or   701                    ((Ht tpServletR esponse) r esponse.ge tResponse( )).sendErr or   701                    ((Ht tpServletR esponse) r esponse.ge tResponse( )).sendErr or
690                         (HttpServl etResponse .SC_INTERN AL_SERVER_ ERROR);   702                         (HttpServl etResponse .SC_INTERN AL_SERVER_ ERROR);   702                         (HttpServl etResponse .SC_INTERN AL_SERVER_ ERROR);
691                } catch  (Exception  f) {   703                } catch  (Exception  f) {   703                } catch  (Exception  f) {
692                    ;   704                    ;   704                    ;
693                }   705                }   705                }
694                ok = fal se;   706                ok = fal se;   706                ok = fal se;
695           }   707           }   707           }
696     708     708  
(123 unchanged lines omitted)
820     832     832  
821           th read = new  Thread(th is, thread Name);   833           th read = new  Thread(th is, thread Name);   833           th read = new  Thread(th is, thread Name);
822           th read.setDa emon(true) ;   834           th read.setDa emon(true) ;   834           th read.setDa emon(true) ;
823           th read.start ();   835           th read.start ();   835           th read.start ();
824     836     836  
825           if  (debug >=  1)   837           if  (debug >=  1)   837           if  (debug >=  1)
826                log(" Ba ckground t hread has  been start ed");   838                log(" Ba ckground t hread has  been start ed");   838                log(" Ba ckground t hread has  been start ed");
827     839     839  
828       }   840       }   840       }
829     841     841  
830     842     842  
831       /**   843       /**   843       /**
832        * Sto p the back ground pro cessing th read.   844        * Sto p the back ground pro cessing th read.   844        * Sto p the back ground pro cessing th read.
833        */   845        */   845        */
834       privat e void thr eadStop()  {   846       privat e void thr eadStop()  {   846       privat e void thr eadStop()  {
835     847     847  
836           lo g(sm.getSt ring("http Processor. stopping") );   848           lo g(sm.getSt ring("http Processor. stopping") );   848           lo g(sm.getSt ring("http Processor. stopping") );
837     849     849  
838           st opped = tr ue;   850           st opped = tr ue;   850           st opped = tr ue;
839           as sign(null) ;   851           as sign(null) ;   851           as sign(null) ;
840           sy nchronized  (threadSy nc) {   852           sy nchronized  (threadSy nc) {   852           sy nchronized  (threadSy nc) {
841                try {   853                try {   853                try {
842                    thre adSync.wai t(5000);   854                    thre adSync.wai t(5000);   854                    thre adSync.wai t(5000);
843                } catch  (Interrupt edExceptio n e) {   855                } catch  (Interrupt edExceptio n e) {   855                } catch  (Interrupt edExceptio n e) {
844                    ;   856                    ;   856                    ;
845                }   857                }   857                }
846           }   858           }   858           }
847           th read = nul l;   859           th read = nul l;   859           th read = nul l;
848     860     860  
849       }   861       }   861       }
850     862     862  
851     863     863  
852       // --- ---------- ---------- ---------- ---------- ---------- - Lifecycl e Methods   864       // --- ---------- ---------- ---------- ---------- ---------- - Lifecycl e Methods   864       // --- ---------- ---------- ---------- ---------- ---------- - Lifecycl e Methods
853     865     865  
854     866     866  
855       /**   867       /**   867       /**
856        * Add  a lifecyc le event l istener to  this comp onent.   868        * Add  a lifecyc le event l istener to  this comp onent.   868        * Add  a lifecyc le event l istener to  this comp onent.
857        *   869        *   869        *
858        * @pa ram listen er The lis tener to a dd   870        * @pa ram listen er The lis tener to a dd   870        * @pa ram listen er The lis tener to a dd
859        */   871        */   871        */
860       public  void addL ifecycleLi stener(Lif ecycleList ener liste ner) {   872       public  void addL ifecycleLi stener(Lif ecycleList ener liste ner) {   872       public  void addL ifecycleLi stener(Lif ecycleList ener liste ner) {
861     873     873  
862           li fecycle.ad dLifecycle Listener(l istener);   874           li fecycle.ad dLifecycle Listener(l istener);   874           li fecycle.ad dLifecycle Listener(l istener);
863     875     875  
864       }   876       }   876       }
865     877     877  
866     878     878  
867       /**   879       /**   879       /**
    880        * Get  the lifec ycle liste ners assoc iated with  this life cycle. If  this    880        * Get  the lifec ycle liste ners assoc iated with  this life cycle. If  this 
    881        * Lif ecycle has  no listen ers regist ered, a ze ro-length  array is r eturned.   881        * Lif ecycle has  no listen ers regist ered, a ze ro-length  array is r eturned.
    882        */   882        */
    883       public  Lifecycle Listener[]  findLifec ycleListen ers() {   883       public  Lifecycle Listener[]  findLifec ycleListen ers() {
    884     884  
    885           re turn lifec ycle.findL ifecycleLi steners();   885           re turn lifec ycle.findL ifecycleLi steners();
    886     886  
    887       }   887       }
    888     888  
    889     889  
    890       /**   890       /**
868        * Rem ove a life cycle even t listener  from this  component .   891        * Rem ove a life cycle even t listener  from this  component .   891        * Rem ove a life cycle even t listener  from this  component .
869        *   892        *   892        *
870        * @pa ram listen er The lis tener to a dd   893        * @pa ram listen er The lis tener to a dd   893        * @pa ram listen er The lis tener to a dd
871        */   894        */   894        */
872       public  void remo veLifecycl eListener( LifecycleL istener li stener) {   895       public  void remo veLifecycl eListener( LifecycleL istener li stener) {   895       public  void remo veLifecycl eListener( LifecycleL istener li stener) {
873     896     896  
874           li fecycle.re moveLifecy cleListene r(listener );   897           li fecycle.re moveLifecy cleListene r(listener );   897           li fecycle.re moveLifecy cleListene r(listener );
875     898     898  
876       }   899       }   899       }
877     900     900  
878     901     901  
879       /**   902       /**   902       /**
880        * Sta rt the bac kground th read we wi ll use for  request p rocessing.   903        * Sta rt the bac kground th read we wi ll use for  request p rocessing.   903        * Sta rt the bac kground th read we wi ll use for  request p rocessing.
881        *   904        *   904        *
882        * @ex ception Li fecycleExc eption if  a fatal st artup erro r occurs   905        * @ex ception Li fecycleExc eption if  a fatal st artup erro r occurs   905        * @ex ception Li fecycleExc eption if  a fatal st artup erro r occurs
883        */   906        */   906        */
884       public  void star t() throws  Lifecycle Exception  {   907       public  void star t() throws  Lifecycle Exception  {   907       public  void star t() throws  Lifecycle Exception  {
885     908     908  
886           if  (started)   909           if  (started)   909           if  (started)
887                throw ne w Lifecycl eException   910                throw ne w Lifecycl eException   910                throw ne w Lifecycl eException
888                    (sm. getString( "httpProce ssor.alrea dyStarted" ));   911                    (sm. getString( "httpProce ssor.alrea dyStarted" ));   911                    (sm. getString( "httpProce ssor.alrea dyStarted" ));
889           li fecycle.fi reLifecycl eEvent(STA RT_EVENT,  null);   912           li fecycle.fi reLifecycl eEvent(STA RT_EVENT,  null);   912           li fecycle.fi reLifecycl eEvent(STA RT_EVENT,  null);
890           st arted = tr ue;   913           st arted = tr ue;   913           st arted = tr ue;
891     914     914  
892           th readStart( );   915           th readStart( );   915           th readStart( );
893     916     916  
894       }   917       }   917       }
895     918     918  
896     919     919  
897       /**   920       /**   920       /**
898        * Sto p the back ground thr ead we wil l use for  request pr ocessing.   921        * Sto p the back ground thr ead we wil l use for  request pr ocessing.   921        * Sto p the back ground thr ead we wil l use for  request pr ocessing.
899        *   922        *   922        *
900        * @ex ception Li fecycleExc eption if  a fatal sh utdown err or occurs   923        * @ex ception Li fecycleExc eption if  a fatal sh utdown err or occurs   923        * @ex ception Li fecycleExc eption if  a fatal sh utdown err or occurs
901        */   924        */   924        */
902       public  void stop () throws  LifecycleE xception {   925       public  void stop () throws  LifecycleE xception {   925       public  void stop () throws  LifecycleE xception {
903     926     926  
904           if  (!started )   927           if  (!started )   927           if  (!started )
905                throw ne w Lifecycl eException   928                throw ne w Lifecycl eException   928                throw ne w Lifecycl eException
906                    (sm. getString( "httpProce ssor.notSt arted"));   929                    (sm. getString( "httpProce ssor.notSt arted"));   929                    (sm. getString( "httpProce ssor.notSt arted"));
907           li fecycle.fi reLifecycl eEvent(STO P_EVENT, n ull);   930           li fecycle.fi reLifecycl eEvent(STO P_EVENT, n ull);   930           li fecycle.fi reLifecycl eEvent(STO P_EVENT, n ull);
908           st arted = fa lse;   931           st arted = fa lse;   931           st arted = fa lse;
909     932     932  
910           th readStop() ;   933           th readStop() ;   933           th readStop() ;
911     934     934  
912       }   935       }   935       }
913     936     936  
914     937     937  
915   }   938   }   938   }