equal
deleted
inserted
replaced
41 Headers reqHdrs, rspHdrs; |
41 Headers reqHdrs, rspHdrs; |
42 Request req; |
42 Request req; |
43 String method; |
43 String method; |
44 URI uri; |
44 URI uri; |
45 HttpConnection connection; |
45 HttpConnection connection; |
46 int reqContentLen; |
46 long reqContentLen; |
47 long rspContentLen; |
47 long rspContentLen; |
48 /* raw streams which access the socket directly */ |
48 /* raw streams which access the socket directly */ |
49 InputStream ris; |
49 InputStream ris; |
50 OutputStream ros; |
50 OutputStream ros; |
51 Thread thread; |
51 Thread thread; |
77 int rcode = -1; |
77 int rcode = -1; |
78 HttpPrincipal principal; |
78 HttpPrincipal principal; |
79 ServerImpl server; |
79 ServerImpl server; |
80 |
80 |
81 ExchangeImpl ( |
81 ExchangeImpl ( |
82 String m, URI u, Request req, int len, HttpConnection connection |
82 String m, URI u, Request req, long len, HttpConnection connection |
83 ) throws IOException { |
83 ) throws IOException { |
84 this.req = req; |
84 this.req = req; |
85 this.reqHdrs = req.headers(); |
85 this.reqHdrs = req.headers(); |
86 this.rspHdrs = new Headers(); |
86 this.rspHdrs = new Headers(); |
87 this.method = m; |
87 this.method = m; |
146 |
146 |
147 public InputStream getRequestBody () { |
147 public InputStream getRequestBody () { |
148 if (uis != null) { |
148 if (uis != null) { |
149 return uis; |
149 return uis; |
150 } |
150 } |
151 if (reqContentLen == -1) { |
151 if (reqContentLen == -1L) { |
152 uis_orig = new ChunkedInputStream (this, ris); |
152 uis_orig = new ChunkedInputStream (this, ris); |
153 uis = uis_orig; |
153 uis = uis_orig; |
154 } else { |
154 } else { |
155 uis_orig = new FixedLengthInputStream (this, ris, reqContentLen); |
155 uis_orig = new FixedLengthInputStream (this, ris, reqContentLen); |
156 uis = uis_orig; |
156 uis = uis_orig; |