No regular expressions were active.
| 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
$
|
| 3 |
|
*
$Revision:
1.
4.2.2
$
|
|
3 |
|
*
$Revision:
1.
9
$
|
| 4 |
|
*
$Date:
2002/04/04
17:
46:
0
9
$
|
|
4 |
|
*
$Date:
2002/04/04
17:
5
0
:34
$
|
| 5 |
|
*
|
|
5 |
|
*
|
| 6 |
|
* =======
==========
==========
==========
==========
==========
==========
=
|
|
6 |
|
* =======
==========
==========
==========
==========
==========
==========
=
|
| 7 |
|
*
|
|
7 |
|
*
|
| 8 |
|
* The Apa
che Softwa
re License
, Version
1.1
|
|
8 |
|
* The Apa
che Softwa
re License
, Version
1.1
|
| 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
|
| 11 |
|
* reserve
d.
|
|
11 |
|
* reserve
d.
|
| 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
|
| 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
:
|
| 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
|
| 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 |
|
*
|
| 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
|
| 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.
|
| 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
|
| 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
|
| 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,
|
| 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 |
|
*
|
| 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
|
| 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
.
|
| 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"
|
| 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.
|
| 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
|
| 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
|
| 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,
|
| 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
|
| 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,
|
| 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
|
| 52 |
|
* SUCH DA
MAGE.
|
|
52 |
|
* SUCH DA
MAGE.
|
| 53 |
|
* =======
==========
==========
==========
==========
==========
==========
=
|
|
53 |
|
* =======
==========
==========
==========
==========
==========
==========
=
|
| 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
|
| 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
|
| 58 |
|
* <http:/
/www.apach
e.org/>.
|
|
58 |
|
* <http:/
/www.apach
e.org/>.
|
| 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]
|
| 61 |
|
*
|
|
61 |
|
*
|
| 62 |
|
*/
|
|
62 |
|
*/
|
| 63 |
|
|
|
63 |
|
|
| 64 |
|
|
|
64 |
|
|
| 65 |
|
package or
g.apache.c
atalina.co
nnector.ht
tp10;
|
|
65 |
|
package or
g.apache.c
atalina.co
nnector.ht
tp10;
|
| 66 |
|
|
|
66 |
|
|
| 67 |
|
|
|
67 |
|
|
| 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;
|
| 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;
|
| 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;
|
| 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;
|
| 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;
|
| 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;
|
| 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;
|
| 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;
|
| 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;
|
| 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;
|
| 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;
|
| 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;
|
| 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;
|
| 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;
|
| |
|
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 |
|
|
|
98 |
|
|
| 98 |
|
|
|
99 |
|
|
| 99 |
|
/**
|
|
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 |
|
* 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 |
|
* 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 |
|
*
|
|
106 |
|
*
|
| 106 |
|
* @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
$
|
| |
|
109 |
|
* @deprec
ated
|
| 108 |
|
*/
|
|
110 |
|
*/
|
| 109 |
|
|
|
111 |
|
|
| 110 |
|
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 {
|
| 112 |
|
|
|
114 |
|
|
| 113 |
|
|
|
115 |
|
|
| |
|
116 |
|
// ---
----------
----------
----------
----------
----------
Manifest
Constants
|
| |
|
117 |
|
|
| |
|
118 |
|
|
| |
|
119 |
|
/**
|
| |
|
120 |
|
* Ser
ver inform
ation stri
ng for thi
s server.
|
| |
|
121 |
|
*/
|
| |
|
122 |
|
privat
e static f
inal Strin
g SERVER_I
NFO =
|
| |
|
123 |
|
Se
rverInfo.g
etServerIn
fo() + " (
HTTP/1.0 C
onnector)"
;
|
| |
|
124 |
|
|
| |
|
125 |
|
|
| 114 |
|
// ---
----------
----------
----------
----------
----------
------ Con
structors
|
|
126 |
|
// ---
----------
----------
----------
----------
----------
------ Con
structors
|
| 115 |
|
|
|
127 |
|
|
| 116 |
|
|
|
128 |
|
|
| 117 |
|
/**
|
|
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.
|
| 119 |
|
*
|
|
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
|
| 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)
|
| 122 |
|
*/
|
|
134 |
|
*/
|
| 123 |
|
public
HttpProce
ssor(HttpC
onnector c
onnector,
int id) {
|
|
135 |
|
public
HttpProce
ssor(HttpC
onnector c
onnector,
int id) {
|
| 124 |
|
|
|
136 |
|
|
| 125 |
|
su
per();
|
|
137 |
|
su
per();
|
| 126 |
|
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(
);
|
| 128 |
|
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();
|
| 130 |
|
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();
|
| 132 |
|
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();
|
| 134 |
|
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
+ "]";
|
| 136 |
|
|
|
148 |
|
|
| 137 |
|
}
|
|
149 |
|
}
|
| 138 |
|
|
|
150 |
|
|
| 139 |
|
|
|
151 |
|
|
| 140 |
|
// ---
----------
----------
----------
----------
----------
Instance
Variables
|
|
152 |
|
// ---
----------
----------
----------
----------
----------
Instance
Variables
|
| 141 |
|
|
|
153 |
|
|
| 142 |
|
|
|
154 |
|
|
| 143 |
|
/**
|
|
155 |
|
/**
|
| 144 |
|
* Is
there a ne
w socket a
vailable?
|
|
156 |
|
* Is
there a ne
w socket a
vailable?
|
| 145 |
|
*/
|
|
157 |
|
*/
|
| 146 |
|
privat
e boolean
available
= false;
|
|
158 |
|
privat
e boolean
available
= false;
|
| 147 |
|
|
|
159 |
|
|
| 148 |
|
|
|
160 |
|
|
| 149 |
|
/**
|
|
161 |
|
/**
|
| 150 |
|
* The
HttpConne
ctor with
which this
processor
is associ
ated.
|
|
162 |
|
* The
HttpConne
ctor with
which this
processor
is associ
ated.
|
| 151 |
|
*/
|
|
163 |
|
*/
|
| 152 |
|
privat
e HttpConn
ector conn
ector = nu
ll;
|
|
164 |
|
privat
e HttpConn
ector conn
ector = nu
ll;
|
| 153 |
|
|
|
165 |
|
|
| 154 |
|
|
|
166 |
|
|
| 155 |
|
/**
|
|
167 |
|
/**
|
| 156 |
|
* The
debugging
detail le
vel for th
is compone
nt.
|
|
168 |
|
* The
debugging
detail le
vel for th
is compone
nt.
|
| 157 |
|
*/
|
|
169 |
|
*/
|
| 158 |
|
privat
e int debu
g = 0;
|
|
170 |
|
privat
e int debu
g = 0;
|
| 159 |
|
|
|
171 |
|
|
| 160 |
|
|
|
172 |
|
|
| 161 |
|
/**
|
|
173 |
|
/**
|
| (438 unchanged lines omitted) |
| 600 |
|
rest
= "";
|
|
612 |
|
rest
= "";
|
| 601 |
|
}
|
|
613 |
|
}
|
| 602 |
|
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;
|
| 604 |
|
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
" +
|
| 606 |
|
((HttpServ
letRequest
) request.
getRequest
()).getReq
uestedSess
ionId());
|
|
618 |
|
((HttpServ
letRequest
) request.
getRequest
()).getReq
uestedSess
ionId());
|
| 607 |
|
}
else {
|
|
619 |
|
}
else {
|
| 608 |
|
request.
setRequest
edSessionI
d(null);
|
|
620 |
|
request.
setRequest
edSessionI
d(null);
|
| 609 |
|
request.
setRequest
edSessionU
RL(false);
|
|
621 |
|
request.
setRequest
edSessionU
RL(false);
|
| 610 |
|
}
|
|
622 |
|
}
|
| 611 |
|
|
|
623 |
|
|
| 612 |
|
//
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);
|
| 614 |
|
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)
;
|
| 616 |
|
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
|
| 618 |
|
|
|
630 |
|
|
| 619 |
|
if
(debug >=
1)
|
|
631 |
|
if
(debug >=
1)
|
| 620 |
|
log(" Re
quest is "
+ method
+ " for "
+ uri);
|
|
632 |
|
log(" Re
quest is "
+ method
+ " for "
+ uri);
|
| 621 |
|
|
|
633 |
|
|
| 622 |
|
}
|
|
634 |
|
}
|
| 623 |
|
|
|
635 |
|
|
| 624 |
|
|
|
636 |
|
|
| 625 |
|
/**
|
|
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
|
| 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
|
| 628 |
|
* swa
llowed and
dealt wit
h.
|
|
640 |
|
* swa
llowed and
dealt wit
h.
|
| 629 |
|
*
|
|
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
|
| 631 |
|
*/
|
|
643 |
|
*/
|
| 632 |
|
privat
e void pro
cess(Socke
t socket)
{
|
|
644 |
|
privat
e void pro
cess(Socke
t socket)
{
|
| 633 |
|
|
|
645 |
|
|
| 634 |
|
bo
olean ok =
true;
|
|
646 |
|
bo
olean ok =
true;
|
| 635 |
|
In
putStream
input = nu
ll;
|
|
647 |
|
In
putStream
input = nu
ll;
|
| 636 |
|
Ou
tputStream
output =
null;
|
|
648 |
|
Ou
tputStream
output =
null;
|
| 637 |
|
|
|
649 |
|
|
| 638 |
|
//
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 {
|
| 640 |
|
input =
new Buffer
edInputStr
eam(socket
.getInputS
tream(),
|
|
652 |
|
input =
new Buffer
edInputStr
eam(socket
.getInputS
tream(),
|
| 641 |
|
connec
tor.getBuf
ferSize())
;
|
|
653 |
|
|