|
23 | 23 | import org.glassfish.grizzly.Connection;
|
24 | 24 | import org.glassfish.grizzly.WriteHandler;
|
25 | 25 | import org.glassfish.grizzly.WriteResult;
|
26 |
| -import org.glassfish.grizzly.filterchain.FilterChain; |
27 | 26 | import org.glassfish.grizzly.filterchain.FilterChainContext;
|
28 | 27 | import org.glassfish.grizzly.http.HttpContent;
|
29 | 28 | import org.glassfish.grizzly.http.HttpRequestPacket;
|
30 | 29 | import org.glassfish.grizzly.impl.FutureImpl;
|
31 | 30 | import org.glassfish.grizzly.nio.NIOConnection;
|
32 | 31 | import org.glassfish.grizzly.nio.SelectorRunner;
|
33 |
| -import org.glassfish.grizzly.ssl.SSLBaseFilter; |
34 |
| -import org.glassfish.grizzly.ssl.SSLFilter; |
35 | 32 | import org.glassfish.grizzly.utils.Futures;
|
36 | 33 |
|
37 | 34 | import static java.lang.Boolean.TRUE;
|
38 | 35 | import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
39 |
| -import static org.glassfish.grizzly.ssl.SSLUtils.getSSLEngine; |
40 | 36 | import static org.glassfish.grizzly.utils.Exceptions.*;
|
41 | 37 |
|
42 | 38 | /**
|
@@ -176,12 +172,7 @@ public synchronized void initializeAsynchronousTransfer(final FilterChainContext
|
176 | 172 | @Override
|
177 | 173 | public void run() {
|
178 | 174 | try {
|
179 |
| - if (requestPacket.isSecure() && |
180 |
| - (getSSLEngine(context.getConnection()) == null)) { |
181 |
| - flushOnSSLHandshakeComplete(); |
182 |
| - } else { |
183 |
| - feeder.flush(); |
184 |
| - } |
| 175 | + feeder.flush(); |
185 | 176 | } catch (IOException ioe) {
|
186 | 177 | HttpTransactionContext ctx = HttpTransactionContext.get(c);
|
187 | 178 | ctx.abort(ioe);
|
@@ -210,32 +201,6 @@ private boolean isCurrentThreadSelectorRunner() {
|
210 | 201 | }
|
211 | 202 |
|
212 | 203 |
|
213 |
| - private void flushOnSSLHandshakeComplete() throws IOException { |
214 |
| - final FilterChain filterChain = context.getFilterChain(); |
215 |
| - final int idx = filterChain.indexOfType(SSLFilter.class); |
216 |
| - assert (idx != -1); |
217 |
| - final SSLFilter filter = (SSLFilter) filterChain.get(idx); |
218 |
| - final Connection c = context.getConnection(); |
219 |
| - filter.addHandshakeListener(new SSLBaseFilter.HandshakeListener() { |
220 |
| - public void onStart(Connection connection) { |
221 |
| - } |
222 |
| - |
223 |
| - public void onComplete(Connection connection) { |
224 |
| - if (c.equals(connection)) { |
225 |
| - filter.removeHandshakeListener(this); |
226 |
| - try { |
227 |
| - feeder.flush(); |
228 |
| - } catch (IOException ioe) { |
229 |
| - HttpTransactionContext ctx = HttpTransactionContext.get(c); |
230 |
| - ctx.abort(ioe); |
231 |
| - } |
232 |
| - } |
233 |
| - } |
234 |
| - }); |
235 |
| - filter.handshake(context.getConnection(), null); |
236 |
| - } |
237 |
| - |
238 |
| - |
239 | 204 | // ----------------------------------------------------------- Inner Classes
|
240 | 205 |
|
241 | 206 |
|
|
0 commit comments